Skip to main content

Autonoma SDK — automate the Autonoma Environment Factory endpoint

Project description

Autonoma Python SDK

Python implementation of the Autonoma Environment Factory SDK.

Package

Package Description
autonoma-ai Core protocol (HMAC, refs, graph, handler)
autonoma-ai[sqlalchemy] SQLAlchemy executor adapter
autonoma-ai[django] Django executor adapter and server handler
autonoma-ai[flask] Flask server adapter
autonoma-ai[fastapi] FastAPI server adapter
autonoma-ai[postgres] PostgreSQL driver (psycopg2)
autonoma-ai[all] All adapters and drivers

Quick Start

Install

pip install autonoma-ai
# With extras:
pip install "autonoma-ai[sqlalchemy,fastapi,postgres]"
# Or everything:
pip install "autonoma-ai[all]"

FastAPI + SQLAlchemy

from autonoma.types import HandlerConfig
from autonoma_fastapi import create_fastapi_handler
from autonoma_sqlalchemy import sqlalchemy_executor
from sqlalchemy import create_engine

engine = create_engine("postgresql://user:pass@localhost/mydb")

config = HandlerConfig(
    executor=sqlalchemy_executor(engine),
    scope_field="organization_id",
    shared_secret="your-shared-secret",
    signing_secret="your-signing-secret",
    auth=lambda user, context: {
        "headers": {"Authorization": f"Bearer {create_session_token(user['id'])}"}
    },
)

router = create_fastapi_handler(config)
app.include_router(router, prefix="/api/autonoma")

Commands

poetry install --all-extras   # install with all adapters
poetry run pytest              # run tests
poetry run pytest -k "sqlalchemy"  # tests matching pattern

Documentation

For protocol-level documentation, see the root protocol/ directory. For runnable examples, see examples/python/.

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

autonoma_ai-0.1.14.dev1776792421.tar.gz (27.7 kB view details)

Uploaded Source

Built Distribution

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

autonoma_ai-0.1.14.dev1776792421-py3-none-any.whl (37.0 kB view details)

Uploaded Python 3

File details

Details for the file autonoma_ai-0.1.14.dev1776792421.tar.gz.

File metadata

File hashes

Hashes for autonoma_ai-0.1.14.dev1776792421.tar.gz
Algorithm Hash digest
SHA256 55ef9b3a4163934592d17129800d8eabe4eee9d4742f13def06c5e54fb0cc1d9
MD5 70c73853c1c5cd9fef765801bada4408
BLAKE2b-256 bea850f7b8e4dd56115917c05ab938936c0656d0264087e9705c4592fb640f6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for autonoma_ai-0.1.14.dev1776792421.tar.gz:

Publisher: canary.yml on Autonoma-AI/sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file autonoma_ai-0.1.14.dev1776792421-py3-none-any.whl.

File metadata

File hashes

Hashes for autonoma_ai-0.1.14.dev1776792421-py3-none-any.whl
Algorithm Hash digest
SHA256 dd5f81cb237be3c201ba8fba5f0cd60ed5fa311be45234aa944cce498edf1249
MD5 7cbd1d75a9a82aab443c43491268aae1
BLAKE2b-256 f863c8af812403826a6d09dbeaa468cc0cd1c70ff3a0a77cbeb7c92df7a04fae

See more details on using hashes here.

Provenance

The following attestation bundles were made for autonoma_ai-0.1.14.dev1776792421-py3-none-any.whl:

Publisher: canary.yml on Autonoma-AI/sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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