Open
Conversation
Wraps the existing Rust kalam-client core via PyO3 (FFI), matching the approach used by the Dart SDK. Published as the kalamdb pip package. Includes: KalamClient with query/query_rows/query_with_files/insert/delete; parameterized queries; live subscriptions via async iterator; topic consumers with explicit mark_processed + commit; run_agent helper for AI agent loops (retry + backoff); auto-refresh of JWT on TOKEN_EXPIRED; lazy login (constructor does no network I/O); async context managers on Client/Subscription/Consumer; typed exception hierarchy; type stubs; client options (timeout/retries). Ships with a README and a GitHub Actions workflow that runs tests on Linux/macOS/Windows x Python 3.9-3.12, builds cross-platform wheels, and offers a manually-triggered PyPI publish. 61 tests passing against Docker rc2, covering full pub/sub loop end-to-end, file uploads, auto-refresh (incl. concurrent reauth), and real value/error assertions (not smoke tests).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
kalamdb, the official Python SDK for KalamDB. Wraps the existing Rustkalam-clientcore via PyO3 (FFI), matching the approach used by the Dart SDK. Published as apip install kalamdbpackage.What's included
KalamClientwithquery,query_rows,query_with_files,insert,delete$1,$2, …)async for event in submark_processed/commitrun_agenthelper for AI-agent loops (retry + exponential backoff)TOKEN_EXPIRED__init__does no network I/O; optionalconnect()async withcontext managers on Client, Subscription, ConsumerKalamError,KalamConnectionError,KalamAuthError,KalamServerError,KalamConfigError).pyi) for editor autocompleteoptions={"timeout_seconds": ..., "max_retries": ...}Test coverage
61 tests across 13 files, all green against Docker rc2. Covers the full pub/sub loop end-to-end (source table, topic, consume, commit advances offset), file uploads with FILE columns, auto-refresh after token invalidation (including concurrent re-auth), SQL metacharacter handling, and every exception class in the paths that should raise it.
Notes
Please review carefully. Expect more commits, bug fixes, and iteration.