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.1.tar.gz (6.1 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.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for auto_genesis_sdk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 44134e7a34af3262924128ba6b0c96520ca419592a52187262c8267ca26c0eff
MD5 da4a9941712be0e66db66dc925dba6ba
BLAKE2b-256 9574ff35d7a38d7a68b0af0113904d52bc92c020138cb4f69d00858016137e62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for auto_genesis_sdk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a06abf637fadf611a96f572ff12da40e0ab157695251a9468bccc373e47ed13
MD5 e131b087d53b401070064a0ad91e323a
BLAKE2b-256 29bb7b2892a7e8d7271967368e714b76b9ae303362b834468bf5e62200b06043

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