Python Live Queries
The Python SDK has the same three realtime concepts as TypeScript and Dart, with Pythonic snake_case names.
Materialized rows
Use live() when your app wants current rows instead of raw change events.
Use live_table() when SELECT * FROM table is enough.
Low-level events
Use live_events() when you need the protocol frames directly.
Options
| Option | Applies to | Meaning |
|---|---|---|
batch_size | all live methods | Max rows per initial snapshot batch |
last_rows | all live methods | Include the last N rows before live changes begin |
from_ | all live methods | Resume from a known sequence ID |
auto_fetch_batches | all live methods | Ask for remaining startup batches automatically |
limit | live(), live_table() | Cap the materialized row set kept by the SDK |
key_columns | live(), live_table() | Stable row identity columns when the query does not expose id |
on_checkpoint | all live methods | Persist the latest applied sequence ID |
on_error | live_events() | Receive low-level error frames separately |
The checkpoint object contains subscription_id and last_seq_id strings. Feed last_seq_id back into from_ on the next session to resume.
Last updated on