Install and Connect the Python SDK
BetaThe KalamDB Python SDK is not production-ready. It shares the Rust client’s networking and reconnect logic through PyO3, but a 0.8 package is not available on PyPI.
Install the KalamDB Python SDK
For experiments, build from the Python SDK source and match the server version. For production SQL applications, use the HTTP API or the PostgreSQL wire listener with Python psycopg.
Authenticate and query
Create app.tasks using the table guide, then connect with application-user credentials:
Use Auth.jwt(token) when your application already has an accepted JWT. Parameter binding keeps input values separate from SQL. The async context manager closes the client when the block ends.
Upload a FILE value
For a table with a FILE column, query_with_files binds file bytes to the matching placeholder:
The file example assumes an open client and an existing app.profiles table. Catch KalamAuthError, KalamConnectionError, KalamServerError, or their base KalamError for failures. Do not retry an uncertain write blindly.
Next: Python live queries. Reference: Files.