Python - collection.query.fetch()

Retrieve a page of results for a query. This is an alternative to collection.query.stream()

from nitric.resources import collection
query = collection("profiles").allow('reading').query()
results = await query.fetch()

Examples

Paging through results from a query

from nitric.resources import collection
query = collection("profiles").allow('reading').query()
# Fetch first page
results = await query.fetch()
# Fetch next page
if results.paging_token:
results = await query.page_from(results.paging_token).fetch()

See also

Last updated on Oct 11, 2024