Sorted Set

ZPOPMIN

Removes and returns up to count members with the lowest scores in the sorted set stored at key.

Arguments

keybodystrrequired

The key of the sorted set

countbodyint

The number of members to pop

Response

List[Tuple[str, float]]

A list of tuples containing the popped members and their scores

Example
redis.zadd("myset", {"a": 1, "b": 2, "c": 3})assert redis.zpopmin("myset") == [("a", 1)]
Loading search…