Python - collection.query.fetch()
Retrieve a page of results for a query. This is an alternative to collection.query.stream()
from nitric.resources import collectionquery = collection("profiles").allow('reading').query()results = await query.fetch()
Examples
Paging through results from a query
from nitric.resources import collectionquery = collection("profiles").allow('reading').query()# Fetch first pageresults = await query.fetch()# Fetch next pageif results.paging_token:results = await query.page_from(results.paging_token).fetch()
See also
Last updated on Dec 19, 2024