Metadata-Version: 2.4
Name: autonoma-ai
Version: 0.1.4
Summary: Autonoma SDK — automate the Autonoma Environment Factory endpoint
License: MIT
Keywords: testing,e2e,environment,factory,automation
Author: Autonoma AI
Author-email: eng@autonoma.ai
Requires-Python: >=3.10
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Testing
Provides-Extra: all
Provides-Extra: django
Provides-Extra: fastapi
Provides-Extra: flask
Provides-Extra: postgres
Provides-Extra: sqlalchemy
Requires-Dist: django (>=4.2) ; extra == "django" or extra == "all"
Requires-Dist: fastapi (>=0.100) ; extra == "fastapi" or extra == "all"
Requires-Dist: flask (>=3.0) ; extra == "flask" or extra == "all"
Requires-Dist: psycopg2-binary (>=2.9) ; extra == "postgres" or extra == "all"
Requires-Dist: sqlalchemy (>=2.0) ; extra == "sqlalchemy" or extra == "all"
Requires-Dist: uvicorn ; extra == "fastapi" or extra == "all"
Project-URL: Homepage, https://autonoma.ai
Project-URL: Repository, https://github.com/Autonoma-AI/sdk
Description-Content-Type: text/markdown

# 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[flask]` | Flask server adapter |
| `autonoma-sdk[fastapi]` | FastAPI server adapter |

## Quick Start

### Install

```bash
pip install autonoma-sdk
# With extras:
pip install "autonoma-sdk[sqlalchemy,fastapi]"
```

### FastAPI + SQLAlchemy

```python
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)
```

## Status

The Python SDK core modules (graph, hmac, refs, fingerprint, template) are complete and pass the conformance test suite. ORM and server adapters are planned.

## Commands

```bash
pip install -e ".[dev]"   # install in development mode
pytest                     # run tests
```

## Documentation

For protocol-level documentation, see the root [`protocol/`](../../protocol/) directory.

