8000 Support for Sorted Sets · Issue #689 · brainix/pottery · GitHub
[go: up one dir, main page]

Skip to content

Support for Sorted Sets #689

Open
Open

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0