Skip to content
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

Support for Sorted Sets #689

Open
devleaks opened this issue May 22, 2022 · 0 comments
Open

Support for Sorted Sets #689

devleaks opened this issue May 22, 2022 · 0 comments

Comments

@devleaks
Copy link

Is your feature request related to a problem? Please describe.
I'd like easy support through python of Redis SortedSet, very much like like Sets.

>>> from pottery import RedisSortedSet
>>> cars = RedisSortedSet({3: "fast", 2: "faster", 1: "fastest"}, redis=redis, key="cars")
>>> cars.add({4: "slow"})
>>> cars.remove({2: "faster"})
>>> cars
RedisSortedSet({1: "fastest", 3: "fast", 4: "slow"}
>>> fastest = cars.pop()
>>> fastest
{1: "fastest"}

Describe the solution you'd like
A mapping between the most appropriate python entity and a Redis Sorted Set, may be a dict of {sorted_criteria: value}?

Describe alternatives you've considered
Using Sorted Set directly

Additional context
None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant