Note: You are viewing documentation for version v0 of Python. View the latest version.
Python - collection.query.stream()
Process query results as a stream.
from nitric.resources import collection
query = collection("profiles").allow('reading').query()
async for doc in query.stream():
# Process doc stream...
print(doc.content)
Examples
Streaming results from a query
from nitric.resources import collection
query = collection("profiles").allow('reading').query()
async for doc in query.stream():
# Process doc stream...
print(doc.content)