Arguments
The stream entry ID to end at (highest ID).
The stream entry ID to start from (lowest ID).
The maximum number of entries to return.
Response
Returns a list of stream entries in reverse chronological order. Each entry contains the ID and field-value pairs.
result = redis.xrevrange("mystream", "+", "-")
result = redis.xrevrange("mystream", "+", "-", count=2)
result = redis.xrevrange("mystream", end="1638360173533-2", start="1638360173533-0")
[
["1638360173533-2", ["field1", "value5", "field2", "value6"]],
["1638360173533-1", ["field1", "value3", "field2", "value4"]],
["1638360173533-0", ["field1", "value1", "field2", "value2"]]
]