Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Apagea Python SDK

The apagea distribution provides the typed Action runtime for Python >=3.14,<3.15. Releases publish exact SDK runtime dependency requirements so ordinary Action locks capture a compatible SDK dependency set. Action-specific dependencies may be added when compatible with those requirements. 0.1.0.dev0 identifies the embedded development SDK.

from pydantic import SecretStr
from apagea.actions import Context, Inputs, Outputs

class Request(Inputs):
    message: str

class Settings(Context):
    api_token: SecretStr

class Result(Outputs):
    message: str

def handler(inputs: Request, context: Settings) -> Result:
    context.log.info("Processing request")
    return Result(message=inputs.message)

Declare the handler in [project.entry-points."apagea.action"]. The Go CLI discovers/builds the interface in a uv-managed environment through this SDK. Context model fields describe deployment-scoped Context requirements; invocation identity, scratch space, logging, and artifact staging are runtime facilities excluded from that schema.

Logger methods are debug, info, warn, error, and exception, with no aliases. Records are bounded and thread-safe. Wrapped secret values are recursively masked, and known secret strings are redacted on a best-effort basis. Unwrapping/transformation is not tracked as taint. Do not write secrets to logs. Sensitive Context disables detailed local exception diagnostics; secret wrappers in public results retain Pydantic's masking. Remote protected outputs are sealed to the server, encrypted at rest, and exposed through separately authorized evidence endpoints.

apagea.fields supplies Pydantic-compatible TextInput, NumberInput, Text, Table, LineChart, and Download helpers. Capture validates component field references and emits versioned metadata plus explicit field order. External clients can render these contracts; apagea.blocks is the preferred output-authoring surface, with Metric, MetricValue, Status, TimeSeries, Table, Text, and Download. Existing output helpers remain compatible. The server returns ordinary fields as JSON without prescribing rendering.

context.artifacts.add stages bounded files from scratch space. Local limits are 16 files, 16 MiB per file, and 64 MiB total. Use the CLI's --artifacts to retain them after execution. Remote artifacts are retained by the server and downloaded through authenticated endpoints.

A handler explicitly annotated -> None may complete without returning domain data. Its wire output is an empty object. A non-None return fails validation. A numeric field can use Metric(format="compact"); a MetricValue field can additionally return value, previous, and comparison for a comparative metric. Logger methods remain unchanged and have no aliases.

uv run --project apagea-sdk python -m unittest discover -s apagea-sdk/tests

See authoring contract and working example.

Helpful failures

Use ActionError(message, code="action_failed", *, hint="") for text intended for the person running the tool. Keep credentials and sensitive data out of all three public fields. Known secrets are additionally redacted by the SDK and server.

raise ActionError(
    "GitHub rejected the configured credential.",
    "github_authentication_failed",
    hint="Ask a Namespace administrator to update the credential.",
) from error

Deployed failures automatically capture a protected exception chain and stack locations, including when Context contains secrets. These are sealed to the server and accessible only through separately authorized, audited diagnostic reads. Unexpected exception messages stay in that protected record. Local diagnostic behavior is unchanged. See invocation diagnostics for collection limits and security boundaries.

Native Actions use the runner account's host networking. Do not set [tool.apagea].network_required; this removed declaration did not enforce access. Virtual environments isolate dependencies, not network or filesystem permissions.

Metadata

Release files for apagea 2026.11.5rc1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apagea 2026.11.5rc1
File Size Uploaded Provenance Actions
apagea-2026.11.5rc1.tar.gz 50.0 kB With provenance Details for apagea-2026.11.5rc1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apagea 2026.11.5rc1
File Interpreter ABI Platform Actions
apagea-2026.11.5rc1-py3-none-any.whl Python 3 none any Details for apagea-2026.11.5rc1-py3-none-any.whl

Total release size: 75.7 kB

Release files / apagea-2026.11.5rc1.tar.gz

Download URL apagea-2026.11.5rc1.tar.gz
Size 50.0 kB
Tags Source
SHA-256 checksum
How to use checksums
88d0dc685510e08e8a93786cf0e0ee7456f96d1d9ac4c1f9406e56790e3d8f6d
BLAKE2b-256 checksum
How to use checksums
429fb1b4f6e7e4da1822025968bc2a46e8093ed38fe90ccee578ee8636cdee21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / apagea-2026.11.5rc1-py3-none-any.whl

Download URL apagea-2026.11.5rc1-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab8d8c92bd41ebab3ec3756f162245c6d1641dbdbbc5dc3fdd87a8ad9c75c574
BLAKE2b-256 checksum
How to use checksums
27aba71d90d616dcc5afe83abd4b0f5b98b49223f1c45933a615b0ae9903a13f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for apagea 2026.11.5rc1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for apagea-2026.11.5rc1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page