Skip to main content

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, @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.

Project details


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.14.tar.gz (71.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

buildathena_sdk-0.1.14-py3-none-any.whl (50.1 kB view details)

Uploaded Python 3

File details

Details for the file buildathena_sdk-0.1.14.tar.gz.

File metadata

  • Download URL: buildathena_sdk-0.1.14.tar.gz
  • Upload date:
  • Size: 71.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.0

File hashes

Hashes for buildathena_sdk-0.1.14.tar.gz
Algorithm Hash digest
SHA256 4b41a02206d4c2993d3cce42e920a3610266c22fcfc95df8a3e93a9345846583
MD5 f1d9c28de977b77cbae5c6dea5c3d760
BLAKE2b-256 3aa2f5e1f7c8f6a4b8a5350ae40782a0d4aee926b8772c50238bbad1d57a4bca

See more details on using hashes here.

File details

Details for the file buildathena_sdk-0.1.14-py3-none-any.whl.

File metadata

File hashes

Hashes for buildathena_sdk-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 da6730b817de7aa3950b7c25dc7b9178f4583de129de9afd76f98f190657713f
MD5 b7e1bd03e78b499a0753973fa5724b39
BLAKE2b-256 00a31ea8af6cd11d6c4d646c84aba855003f6e77a0ad6f35ecd5ab5cdc64d7e7

See more details on using hashes here.

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