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)

    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:

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.

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.29.tar.gz (69.3 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.29-py3-none-any.whl (44.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for buildathena_sdk-0.1.29.tar.gz
Algorithm Hash digest
SHA256 e6273be63c6853c8c5ce71ced8f16dfb70c9441e335e27f0c2c3fa2ea4d0e5ec
MD5 486c5df51f14b824c759f38d1ce8004a
BLAKE2b-256 4e274b4b7cbfa537a1bb2343675234bef92e1931b1510079c166567650367c85

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for buildathena_sdk-0.1.29-py3-none-any.whl
Algorithm Hash digest
SHA256 574de7b9d2d0e5e862792ce5a055abe4676d7f0f460afba59089bd8cd6320e81
MD5 cef7eb2c007bc2ac5963d21049618153
BLAKE2b-256 605ffd8a16523b97e5a1da4d4b4e3d9cf7e939df91c621b39780d5a121246f23

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