Skip to main content

Documentation Index

Fetch the complete documentation index at: https://upstash-vector.mintlify.app/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 index of the first element to keep.
stop
int
required
The index of the first element to keep.

Response

Returns True if the list was trimmed, False otherwise.
redis.rpush("mylist", "one", "two", "three")

assert redis.ltrim("mylist", 0, 1) == True

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