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.34.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.34-py3-none-any.whl (44.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: buildathena_sdk-0.1.34.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.34.tar.gz
Algorithm Hash digest
SHA256 f6e415b5a8ff5cf52fe92baaf98420a4b2b0e68f039ad7cce4c1aad5f1367e39
MD5 bd7e4448aecfac80e92a87113ff67b42
BLAKE2b-256 e64ce6d9231f49207a54c1ff156fd9c42aa9af13afabd429f8f6bdb841a816a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for buildathena_sdk-0.1.34-py3-none-any.whl
Algorithm Hash digest
SHA256 8c7290a57f00c73950b9a9580d471d2adb82b55d0595fd0ee4555e312fde80d9
MD5 d49e78abeb23b1924263cf2c4a327945
BLAKE2b-256 f7e2aa26e2497c500640b5c41971dd056eb9d680a899fb8557e4fd25958c9bda

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