isA Common
Shared async Python client library for the isA platform.
Overview
isa-common provides async Python clients for interacting with isA Cloud infrastructure services. All clients use async with context managers and share a common base class (AsyncBaseClient).
Infrastructure Clients (require running services)
| Client | Service | Default Port | Protocol |
|---|---|---|---|
AsyncRedisClient |
Redis | 6379 | gRPC proxy |
AsyncPostgresClient |
PostgreSQL | 5432 | gRPC proxy |
AsyncNeo4jClient |
Neo4j | 7687 | gRPC proxy |
AsyncNATSClient |
NATS | 4222 | gRPC proxy |
AsyncMQTTClient |
MQTT | 1883 | gRPC proxy |
AsyncMinioClient |
MinIO | 9000 | gRPC proxy |
AsyncQdrantClient |
Qdrant | 6333 | gRPC proxy |
AsyncDuckDBClient |
DuckDB | embedded | native |
Local-Mode Clients (no external services needed)
Drop-in alternatives for desktop/offline use. Same API surface, backed by local storage:
| Local Client | Replaces | Backed By |
|---|---|---|
AsyncSQLiteClient |
AsyncPostgresClient |
SQLite file |
AsyncLocalStorageClient |
AsyncMinioClient |
Local filesystem |
AsyncChromaClient |
AsyncQdrantClient |
ChromaDB (embedded) |
AsyncMemoryClient |
AsyncRedisClient |
In-memory dict |
When to use local clients: Use local-mode clients when running on desktop/ICP without cloud infrastructure, for development/testing without Docker, or when you need offline-capable storage.
Installation
pip install isa-common
Quick Start
from isa_common import AsyncRedisClient
async with AsyncRedisClient(host="localhost", port=6379, user_id="my-user") as client:
health = await client.health_check()
await client.set("key", "value")
value = await client.get("key")
Using Local-Mode Clients
from isa_common import AsyncSQLiteClient, AsyncLocalStorageClient
# SQLite instead of PostgreSQL
async with AsyncSQLiteClient(database="app.db", user_id="my-user") as db:
await db.query("SELECT * FROM users")
# Local filesystem instead of MinIO
async with AsyncLocalStorageClient(base_path="./storage", user_id="my-user") as storage:
await storage.put_object("my-bucket", "file.txt", b"contents")
Development
Run tests (requires services or use local clients):
# Run individual service tests
python tests/redis/test_async_redis.py
python tests/duck/test_async_duckdb.py
# Run all tests via Makefile
make test
Contract Coverage
See tests/contract_coverage.md for the mapping between CDD contract IDs (BR/EC/ER) and test functions.
License
Copyright © 2024 isA Platform
Release files for isa-common 0.6.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| isa_common-0.6.12.tar.gz | 185.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| isa_common-0.6.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 399.6 kB
Release files / isa_common-0.6.12.tar.gz
| Download URL | isa_common-0.6.12.tar.gz |
|---|---|
| Size | 185.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac4ca91e363df8aafebf5d658cc0fe8a46170d5cc2f8455a135feab725c9b0f1
|
|
BLAKE2b-256 checksum How to use checksums |
540b2ebd3db4686138b53ea5a7ae81366f87690755f0ca47c4c32a3fc034c528
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Release files / isa_common-0.6.12-py3-none-any.whl
| Download URL | isa_common-0.6.12-py3-none-any.whl |
|---|---|
| Size | 214.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3735aa66328fddf7c759d6dfa9ded69f21e7e47a3e0be5df7b5ef6f8e247c20c
|
|
BLAKE2b-256 checksum How to use checksums |
a433835369c7bebbc031b2260aa09f7e61737122ae15b2c36542bf2af8c8d9da
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|