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.
Range Command for Python SDK
The range method is used to retrieve documents in chunks with pagination.
Arguments
The cursor to the last retrieved document. Should be set to "" in the initial range request.
The number of maximum documents wanted in the response of range. (page size)
Response
This field is null if no document with the specified ID is found.
The ID of the resulting document.
The main content of the document.
Additional metadata for the document.
The cursor for the next page of documents.
range_documents = index.range(cursor="", limit=1)
print(range_documents.documents)
range_documents = index.range(
cursor=range_documents.next_cursor,
limit=3
)
print(range_documents.documents)