Skip to main content

Arguments

key
str
required
The key of the stream.
start
str
default:"-"
The stream entry ID to start from. Use ”-” for the first available ID.
end
str
default:"+"
The stream entry ID to end at. Use ”+” for the last available ID.
count
int
The maximum number of entries to return.

Response

A list of stream entries, where each entry is a tuple containing the stream ID and its associated fields and values.
result = redis.xrange("mystream", "-", "+")
{
  "1548149259438-0": {
    "field1": "value1",
    "field2": "value2"
  },
  "1548149259438-1": {
    "field1": "value3",
    "field2": "value4"
  }
}
I