Skip to main content
Pre-release

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

StackGen Python SDK

Documentation: https://appcd-dev.github.io/stackgen-sdk/ — Aiden guide, code samples, FAQ, and CI integration.

Install:

pip install stackgen-sdk

Import package name is stackgen. Construct the client with an explicit config:

from pathlib import Path
from stackgen import StackgenClient, StackgenConfig

client = StackgenClient(
    StackgenConfig(
        base_url="https://app.stackgen.com",
        api_token="stackgen_…",
        workspace_id="<workspace-uuid>",
        webhook_token="sg_aios_…",  # webhook journeys only
    )
)

result = client.aiden.run_webhook_and_download_report(
    Path("alert.json").read_text(encoding="utf-8")
)
print(result.session_id, result.output_path)

ask = client.aiden.run_ask_and_download_artifact(
    message="Run triage for checkout CPU alert",
    entity_refs=[{"name": "observe-uber-triage", "type": "workflow"}],
)
print(ask.trace_id, ask.output_path)

alerts = client.sre.list_alerts()

Default environment variables

StackgenConfig.from_env() reads only these (optional convenience):

Variable Purpose
STACKGEN_URL Mothership URL (no path suffix)
STACKGEN_TOKEN API token (stackgen_…)
STACKGEN_WORKSPACE_ID Workspace UUID (sent as orgId). The older STACKGEN_PROJECT and STACKGEN_ORG_ID still work as fallbacks.

Pass webhook_token, webhook_id, timeouts, and artifact paths as StackgenConfig fields — not via env.

from dataclasses import replace
from stackgen import StackgenClient, StackgenConfig

client = StackgenClient(
    replace(StackgenConfig.from_env(), webhook_token="sg_aios_…")
)

Namespaces

  • client.aiden — webhooks, Ask, sessions, artifact download
  • client.sre — alerts and investigations
  • client.vault — secrets (not enabled in this release)
  • client.me — the calling user: enabled feature flags and resolved preferences

Prefer StackgenClient over stackgen.generated.

Pin versions in CI: pip install stackgen-sdk==0.1.5.

Documentation: https://appcd-dev.github.io/stackgen-sdk/ (Aiden guide, FAQ, code samples)

Metadata

Release files for stackgen-sdk 0.5.0rc21

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

Source distribution (sdist)

Source distribution for stackgen-sdk 0.5.0rc21
File Size Uploaded Provenance Actions
stackgen_sdk-0.5.0rc21.tar.gz 481.7 kB With provenance Details for stackgen_sdk-0.5.0rc21.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stackgen-sdk 0.5.0rc21
File Interpreter ABI Platform Actions
stackgen_sdk-0.5.0rc21-py3-none-any.whl Python 3 none any Details for stackgen_sdk-0.5.0rc21-py3-none-any.whl

Total release size: 1.8 MB

Release files / stackgen_sdk-0.5.0rc21.tar.gz

Download URL stackgen_sdk-0.5.0rc21.tar.gz
Size 481.7 kB
Tags Source
SHA-256 checksum
How to use checksums
86c94c05ddaa2f182d0bbd48e50f7d59d00b9298962dbdb3fd55e31f4fe5caae
BLAKE2b-256 checksum
How to use checksums
e3c5c0e7b249bbf7f3be207bceb962513392951347529c6dd5fbe78c648204d4
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 14, 2026.

Transparency log

Release files / stackgen_sdk-0.5.0rc21-py3-none-any.whl

Download URL stackgen_sdk-0.5.0rc21-py3-none-any.whl
Size 1.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
3bcdc4aa58d5a588ee36ae1611f016a1cce01fdcfab794fd351e04bd6c24f951
BLAKE2b-256 checksum
How to use checksums
a99ccc6a4cf2d0f6d8e0f92b4c92f7d3fcf0a1bcf39233e8f2bfbbb24e79383b
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 14, 2026.

Transparency log

Security for stackgen-sdk 0.5.0rc21

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for stackgen_sdk-0.5.0rc21.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 14, 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.

Release history Release notifications | RSS feed

This release
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