Metadata-Version: 2.4
Name: buildathena-sdk
Version: 0.1.31
Summary: Athena Python SDK for block development
Project-URL: Homepage, https://buildathena.dev
Author-email: Athena <richard@buildathena.dev>
License: Proprietary
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Requires-Dist: aiofiles>=23.0.0
Requires-Dist: click<9.0.0,>=8.0.0
Requires-Dist: httpx<1.0.0,>=0.26.0
Requires-Dist: pydantic<3.0.0,>=2.5.0
Requires-Dist: pyyaml<7.0.0,>=6.0.0
Provides-Extra: dev
Requires-Dist: mypy>=1.7.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest-timeout>=2.2.0; extra == 'dev'
Requires-Dist: pytest-xdist>=3.0.0; extra == 'dev'
Requires-Dist: pytest>=7.4.0; extra == 'dev'
Description-Content-Type: text/markdown

# athena-sdk

Python SDK for building blocks and workflows on the Athena ML orchestration platform.

## Installation

```bash
pip install buildathena-sdk
```

## Quick Start

### Define a Block

```python
from athena import block, BlockContext

@block(name="TrainModel", outputs=["checkpoint"])
async def train_model(ctx: BlockContext, epochs: int = 100):
    for epoch in range(epochs):
        loss = train_epoch()
        await ctx.emit_metric("loss", loss, epoch=epoch)

    ref = await ctx.artifacts.register("model.pt", schema_type="checkpoint")
    return {"checkpoint": ref}
```

### Use Credentials

Declare required secrets in the `@block` decorator and access via `ctx.secrets`:

```python
from athena import block, BlockContext

@block(name="MyBlock", secrets=["OPENAI_API_KEY"])
async def my_block(ctx: BlockContext, config):
    key = ctx.secrets["OPENAI_API_KEY"]
```

## Features

- **Block Decorator**: `@block` for defining workflow nodes
- **Handler Decorator**: `@handler` for custom URI scheme storage backends (s3://, gs://)
- **Inspector Backend**: `@inspector_backend` protocol for interactive UI plugins
- **BlockContext**: Emit metrics, progress, logs, and register artifacts
- **Config System**: YAML with `$include`, `$extends`, `${ref}` substitution
- **Discovery**: AST-based scanner for workspace block detection
- **Credentials**: Secure secret management with `@block(secrets=...)` and `ctx.secrets`

## License

Proprietary - Copyright (c) 2026 Athena Technologies. All rights reserved.
