Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Support for Sorted Sets #689

@devleaks

Description

@devleaks

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions