Skip to main content

Documentation Index

Fetch the complete documentation index at: https://upstash.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Arguments

key
str
required
The key of the list.
start
int
required
The starting index of the range to return.Use negative numbers to specify offsets starting at the end of the list.
end
int
required
The ending index of the range to return.Use negative numbers to specify offsets starting at the end of the list.

Response

The list of elements in the specified range.
redis.rpush("mylist", "one", "two", "three")

assert redis.lrange("mylist", 0, 1) == ["one", "two"]

assert redis.lrange("mylist", 0, -1) == ["one", "two", "three"]