entries = redis.xrange(key, "-", "+")
print(entries)
# {
#   "1548149259438-0": {
#     "field1": "value1",
#     "field2": "value2"
#   },
#   "1548149259438-1": {
#     "field1": "value3",
#     "field2": "value4"
#   }
# }

Arguments

key
str
required

The key to of the stream.

start
str
required

The stream entry ID to start from.

end
str
required

The stream entry ID to end at.

count
int

The maximum number of entries to return.

Response

An object of stream entries, keyed by their stream ID

Was this page helpful?