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-sdk Core protocol (HMAC, refs, templates, graph, handler)
autonoma-sdk[sqlalchemy] SQLAlchemy ORM adapter
autonoma-sdk[django] Django ORM adapter and server handler
autonoma-sdk[flask] Flask server adapter
autonoma-sdk[fastapi] FastAPI server adapter
autonoma-sdk[postgres] PostgreSQL driver (psycopg2)
autonoma-sdk[all] All adapters and drivers

Quick Start

Install

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

FastAPI + SQLAlchemy

from autonoma.handler import handle_request, PROTOCOL_VERSION
from autonoma.types import HandlerConfig, HandlerRequest

config = HandlerConfig(
    shared_secret="your-shared-secret",
    signing_secret="your-signing-secret",
    adapter=my_adapter,
    auth=lambda user: {
        "headers": {"Authorization": f"Bearer {create_session_token(user['id'])}"}
    },
)

@app.post("/api/autonoma")
async def autonoma_endpoint(request: Request):
    body = await request.body()
    headers = dict(request.headers)
    req = HandlerRequest(body=body.decode(), headers=headers)
    result = handle_request(config, req)
    return JSONResponse(content=result.body, status_code=result.status)

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

This version

0.1.7

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: autonoma_ai-0.1.7.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for autonoma_ai-0.1.7.tar.gz
Algorithm Hash digest
SHA256 ef49e44c59b8c2233bb2dacb5d6204be2d954bc8038952dca36824373b0b50ba
MD5 baaf0bff7e2dfd8fa5a08c3822e6e510
BLAKE2b-256 f2549e878ba9d12fed22fb0419d6e3be861000b2e930a8b3fb9ab151a05370f9

See more details on using hashes here.

Provenance

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

Publisher: publish.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.7-py3-none-any.whl.

File metadata

  • Download URL: autonoma_ai-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 33.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for autonoma_ai-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8ccf746c47f87ab6de61c79baecde348b7604a557bc77075aaa0d2baf8de2753
MD5 4c50beba03518d148f353ebac08850c0
BLAKE2b-256 998a0b2a078a650ea471f2f49ede7bdd44b4e253cda5cb8c698e09259fdf67ff

See more details on using hashes here.

Provenance

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

Publisher: publish.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