Shared Python infrastructure library for isA platform
Project description
isA Common
Shared Python infrastructure library for the isA platform.
Overview
isa-common provides Python client libraries and utilities for interacting with various infrastructure services in the isA Cloud platform, including:
- DuckDB Client - Analytics database integration
- Loki Client - Log aggregation and querying
- MinIO Client - Object storage operations
- MQTT Client - Message broker for IoT
- NATS Client - Cloud-native messaging system
- Redis Client - Caching and data structures
- Supabase Client - Backend-as-a-Service integration
Installation
Install from PyPI:
pip install isa-common
Quick Start
DuckDB Client Example
from isa_common.duckdb_client import DuckDBClient
client = DuckDBClient(host="localhost", port=50051)
client.connect()
# Execute query
result = client.execute_query("SELECT * FROM my_table")
print(result)
NATS Client Example
from isa_common.nats_client import NATSClient
client = NATSClient(host="localhost", port=50054)
client.connect()
# Publish message
client.publish("my.subject", b"Hello World")
# Subscribe to subject
messages = client.subscribe("my.subject")
MinIO Client Example
from isa_common.minio_client import MinIOClient
client = MinIOClient(host="localhost", port=50052)
client.connect()
# Upload file
client.put_object("my-bucket", "file.txt", b"file contents")
# Download file
data = client.get_object("my-bucket", "file.txt")
Features
- gRPC-based communication with backend services
- Service Discovery integration with Consul
- Automatic Reconnection with configurable retry policies
- Type Safety with Pydantic models
- Comprehensive Examples included in the package
Requirements
- Python 3.8+
- grpcio >= 1.50.0
- pydantic >= 2.0.0
- tenacity >= 8.0.0
Documentation
For detailed documentation and more examples, see:
- DuckDB Client Examples
- Loki Client Examples
- MinIO Client Examples
- MQTT Client Examples
- NATS Client Examples
- Redis Client Examples
- Supabase Client Examples
Development
Install development dependencies:
pip install isa-common[dev]
Run tests:
pytest
License
Copyright © 2024 isA Platform
Support
For issues and questions, please visit: https://github.com/isa-platform/isA_Cloud
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file isa_common-0.3.0.tar.gz.
File metadata
- Download URL: isa_common-0.3.0.tar.gz
- Upload date:
- Size: 205.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9b112a844faed3254cb7e86858df5a7f649cc8368b9484c35296bc3f6dab1e5
|
|
| MD5 |
8676df61fba0b77cce64390ffaf0654d
|
|
| BLAKE2b-256 |
28dd3f925ac7ff9247987dc749e326e46ce163fb4cba4636e8d1ea0f6665d87f
|
File details
Details for the file isa_common-0.3.0-py3-none-any.whl.
File metadata
- Download URL: isa_common-0.3.0-py3-none-any.whl
- Upload date:
- Size: 222.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62d955acdb1d4531a03937b9dca467dff484fcdf5c8578a033529b14191c8fe6
|
|
| MD5 |
11f4fb04cac41e7fe4fa9a094ef1af80
|
|
| BLAKE2b-256 |
4105f501f0975ee4e4c8b79f503700e20b8e11c7e95d29674d381800e5eaeeb0
|