Skip to Content
Getting StartedOverview

Python SDK

Beta

The Python SDK is not production-ready. Its async SQL and live-query APIs are documented, but the kalamdb package is not available on PyPI for the 0.8 release. See Python SDK status before using these examples. For a Python application today, use the HTTP API or the PostgreSQL wire listener with psycopg.

python
from kalamdb import Auth, KalamClient async with KalamClient("http://localhost:2900", Auth.basic("admin", "AdminPass123!")) as client:    rows = await client.query_rows("SELECT * FROM app.messages LIMIT 20")    print(rows)

Live APIs

Use these three methods for realtime work:

MethodReturnsUse for
live(sql, ...)LiveRowsMaterialized row snapshots for a supported SELECT query
live_table(table, ...)LiveRowsMaterialized row snapshots for SELECT * FROM table
live_events(sql, ...)LiveEventsLow-level protocol events such as subscription_ack, initial_data_batch, change, and error

Read next: Live Queries.