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.
elements
*List[Any]
required
One or more elements to push at the head of the list.

Response

The length of the list after the push operation.
assert redis.lpush("mylist", "one", "two", "three") == 3

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