Skip to main content

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:

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

isa_common-0.1.7.tar.gz (143.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isa_common-0.1.7-py3-none-any.whl (157.1 kB view details)

Uploaded Python 3

File details

Details for the file isa_common-0.1.7.tar.gz.

File metadata

  • Download URL: isa_common-0.1.7.tar.gz
  • Upload date:
  • Size: 143.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for isa_common-0.1.7.tar.gz
Algorithm Hash digest
SHA256 c3cc22886ed12c17a48119b9d49d91502b2c99b389e24f0adc1220a4e2d3ee5c
MD5 e27cbbfdc67f62c9b23a21c1ac625f89
BLAKE2b-256 da0f67cb5377b40e41c3f19764e3e472ec26c0bbf21c2ab6361c73368e55d226

See more details on using hashes here.

File details

Details for the file isa_common-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: isa_common-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 157.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for isa_common-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 94ae5d3cea6b2ac93b5acec88384d95129ccb227852ca0e8167d59a8ae9b807f
MD5 9e6a756b5846ac2e40ce0f0c8db68d5c
BLAKE2b-256 9fe8cf262260b2d83af11b9e0f37f0302dd7df86f95f2cea438d39be1643fb0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page