from upstash_search import Search

client = Search(
    url="<UPSTASH_SEARCH_REST_URL>",
    token="<UPSTASH_SEARCH_REST_TOKEN>",
)

info = client.info()
print(info)

Info Command for Python SDK

Used to retrieve the stats of an index.

Response

document_count
int
required
The total number of documents in the database, that are ready to use.
pending_document_count
int
required
The number of documents in the database, that are still processing and not ready to use.
disk_size
int
required
Size of the database in bytes.
indexes
required
Doctionary of index names and their information (document_count and pending_document_count)
from upstash_search import Search

client = Search(
    url="<UPSTASH_SEARCH_REST_URL>",
    token="<UPSTASH_SEARCH_REST_TOKEN>",
)

info = client.info()
print(info)