Skip to main content

A unified Python SDK for seamless integration with Autonomize services, providing telemetry, logging, and tracing capabilities.

Project description

Auto Genesis SDK

Python Version PyPI Version Code Style Imports Type Checking Tests

The Auto Genesis SDK serves as the unified interface for all Autonomize service SDKs. It provides a streamlined way to access and utilize various Autonomize capabilities through a single, cohesive package. This centralized approach simplifies dependency management and ensures version compatibility across all Autonomize SDKs.

Features

The Auto Genesis SDK provides several key advantages:

  • Unified Access: Single entry point for all Autonomize SDKs
  • Version Compatibility: Guaranteed compatibility between different SDK modules
  • Simplified Dependencies: Managed dependencies and requirements across all SDKs
  • Consistent Interface: Standardized API patterns across all SDK modules
  • Integrated Configuration: Unified configuration management for all services

Available SDKs

Currently, the Auto Genesis SDK includes the following modules:

Telemetry SDK

Comprehensive observability solution built on OpenTelemetry, providing:

  • Unified metrics, logging, and tracing capabilities
  • FastAPI auto-instrumentation
  • Configurable export endpoints
  • Structured logging with context
  • Custom metric creation and management

Installation

You can install the Auto Genesis SDK using pip:

pip install auto-genesis-sdk

Or using Poetry:

poetry add auto-genesis-sdk

Quick Start

Here's how to get started with the Auto Genesis SDK:

from auto_genesis_sdk import Telemetry, TelemetryConfig

# Configure telemetry service
config = TelemetryConfig(
    service_name="my-service",
    environment="production",
    otlp_endpoint="http://localhost:4317",
    version="1.0.0"
)

# Initialize telemetry
telemetry = Telemetry(config)
await telemetry.start()

try:
    # Use telemetry features
    telemetry.logging.info("Application started", {"version": "1.0.0"})

    # Create metrics
    request_counter = telemetry.metrics.create_counter(
        name="http.requests",
        description="Number of HTTP requests"
    )

    # Use tracing
    async def my_operation():
        return "result"

    result = await telemetry.tracing.create_span(
        "my-operation",
        my_operation
    )
finally:
    await telemetry.shutdown()

Configuration

Each SDK module maintains its own configuration options while sharing common patterns. For example, the Telemetry SDK configuration:

TelemetryConfig(
    service_name="my-service",
    environment="production",
    version="1.0.0",
    otlp_endpoint="http://localhost:4317",
    metric_interval_ms=5000,
    log_level="INFO"
)

Development

To set up the development environment:

  1. Clone the repository:
git clone https://github.com/autonomize-ai/auto-genesis-sdk.git
  1. Install dependencies with uv:
uv venv
uv pip install -e .
  1. Install pre-commit hooks:
uv pip install pre-commit
pre-commit install

Testing

Run the test suite using pytest:

uv pip install pytest
pytest

Contributing

We welcome contributions to the Auto Genesis SDK! Please read our Contributing Guide before making any changes.

When contributing, keep in mind:

  • Follow the existing code style and documentation patterns
  • Add tests for new features
  • Update documentation as needed
  • Maintain compatibility with existing SDK modules

License

This project is licensed under the terms of the LICENSE.

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

auto_genesis_sdk-0.0.2.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

auto_genesis_sdk-0.0.2-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file auto_genesis_sdk-0.0.2.tar.gz.

File metadata

  • Download URL: auto_genesis_sdk-0.0.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.2

File hashes

Hashes for auto_genesis_sdk-0.0.2.tar.gz
Algorithm Hash digest
SHA256 89a0682165e18d1726a7b154b846a1e15dac4ad815ac9afb7ace3dfcdecc6963
MD5 1bb2b83adeb634677c9c36dc45deb623
BLAKE2b-256 b2590ed59c36d4e9ed3003d119d7dd9803f4e3f3bf341f97cb0ea8e358d2b0cb

See more details on using hashes here.

File details

Details for the file auto_genesis_sdk-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for auto_genesis_sdk-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7e4f520d5b6a00505dc8a2bd72d72ce3e4b90e21fee61c960b1784afeaeb8d84
MD5 f3bf4d9bc20ff0e98cfa3a483002df75
BLAKE2b-256 1c1d31160843c6c45e59c586a017d1bcaba57b76eaf1d92eb8ae9c57b276a3b1

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