Metadata-Version: 2.4
Name: buildathena-sdk
Version: 0.1.23
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)

    artifact_id = ctx.artifacts.register("model.pt", schema="checkpoint")
    return {"checkpoint": artifact_id}
```

### Define an Entrypoint

```python
from athena import entrypoint

@entrypoint()
async def main():
    # Entrypoint is the DAG root that triggers block execution
    pass
```

### 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 Decorators**: `@block`, `@entrypoint` for defining workflow nodes
- **BlockContext**: Emit metrics, progress, logs, and register artifacts
- **Config System**: YAML with `$include`, `$extends`, `${ref}` substitution
- **Discovery**: AST-based scanner for workspace block/entrypoint detection
- **Credentials**: Secure secret management with `@block(secrets=...)` and `ctx.secrets`

## License

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