-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python: adds GEOHASH command #1281
Conversation
cef2706
to
ca8c895
Compare
async def geohash(self, key: str, members: List[str]) -> List[Optional[str]]: | ||
""" | ||
Returns the GeoHash strings representing the positions of all the specified members in the sorted set stored at | ||
`key`. If a member does not exist in the sorted set, a None value is returned for that member. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`key`. If a member does not exist in the sorted set, a None value is returned for that member. | |
`key`. If a member does not exist in the sorted set, a `None` value is returned for that member. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this sentence to Returns
section
>>> await client.geoadd("my_geo_sorted_set", {"Palermo": Coordinate(13.361389, 38.115556), "Catania": Coordinate(15.087269, 37.502669)}) | ||
2 # Indicates that two elements have been added to the sorted set "my_geo_sorted_set". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can omit this
def geohash(self: TTransaction, key: str, members: List[str]) -> TTransaction: | ||
""" | ||
Returns the GeoHash strings representing the positions of all the specified members in the sorted set stored at | ||
`key`. If a member does not exist in the sorted set, a None value is returned for that member. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments
@@ -131,6 +131,23 @@ class UpdateOptions(Enum): | |||
GREATER_THAN = "GT" | |||
|
|||
|
|||
class Coordinate: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is an incorrect term - coordinate is a verb.
Suggesting GeospatialData
Adds geospatial members with their positions to the specified sorted set stored at `key`. | ||
If a member is already a part of the sorted set, its position is updated. | ||
|
||
See https://redis.io/commands/geoadd for more details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use valkey url
db75ef5
to
f53e261
Compare
f53e261
to
9859138
Compare
Issue #, if available:
Description of changes:
This pr is rebased over #1259
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.