Athena Python SDK for block development
Project description
athena-sdk
Python SDK for building blocks and workflows on the Athena ML orchestration platform.
Installation
pip install buildathena-sdk
Quick Start
Define a Block
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
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:
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,@entrypointfor 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=...)andctx.secrets
License
Proprietary - Copyright (c) 2026 Athena Technologies. All rights reserved.
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
buildathena_sdk-0.1.23.tar.gz
(71.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file buildathena_sdk-0.1.23.tar.gz.
File metadata
- Download URL: buildathena_sdk-0.1.23.tar.gz
- Upload date:
- Size: 71.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
505dba1c4600215591b1c06319187da56f1d9ec28036376aff91c903c5c4a1f1
|
|
| MD5 |
a7a68b5546bca750d283351f03b4b0c1
|
|
| BLAKE2b-256 |
24482bffbd63237c175f92b050c48b112a936423fcf4e5bf97a6c023ac8ea5c8
|
File details
Details for the file buildathena_sdk-0.1.23-py3-none-any.whl.
File metadata
- Download URL: buildathena_sdk-0.1.23-py3-none-any.whl
- Upload date:
- Size: 50.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15915b14bc128acf773112732e7cf3423f4116d8c6d3d073bd17f9b0b65477ac
|
|
| MD5 |
b304bc63c4a7d94f59afd6d38978da56
|
|
| BLAKE2b-256 |
d2788a1582192eb59643aae0d9226cdd0a16c63e9d8319f5cfc72493571a9c33
|