from lambdadb import LambdaDB
with LambdaDB(
project_api_key="YOUR_API_KEY",
base_url="YOUR_BASE_URL",
project_name="YOUR_PROJECT_NAME",
) as client:
coll = client.collection("my_collection")
# List first page of documents
res = coll.docs.list(size=10)
# `res.docs` contains items (each item includes `doc` and metadata).
# `res.documents` contains document bodies only.
for item in res.docs:
print(item)
# List next page using the token from the previous response
if res.next_page_token:
res_next = coll.docs.list(size=10, page_token=res.next_page_token)