Sorted Set
ZRANGE
Returns the specified range of elements in the sorted set stored at key.
Arguments
key
str
requiredThe key to get.
min
float | str
requiredThe minimum value to include.
max
float | str
requiredThe maximum value to include.
“-inf” and “+inf” are also valid values for the ranges
withscores
bool
Whether to include the scores in the response.
rev
bool
Whether to reverse the order of the response.
sortby
"BYSCORE" | "BYLEX"
If bylex
offset
int
The offset to start from.
count
int
The number of elements to return.
Response
The values in the specified range.
If withscores
is true, the members will be tuples of the form (member, score)
.
Was this page helpful?