Skip to main content

Official Python SDK for AllStak — error tracking, structured logs, HTTP + DB monitoring, distributed tracing, and cron monitoring with first-class FastAPI, Django and Flask support

Project description

allstak

AllStak SDK for Python, Django, Flask, FastAPI, and plain services. Captures exceptions, logs, inbound and outbound HTTP requests, spans, database telemetry, and cron heartbeats.

Install

Not yet on PyPI. pip install allstak is reserved but does not resolve a published artifact yet. Until first publish lands (tracked in docs/devops/sdk-python-dotnet-first-publish.md in the platform monorepo), install directly from source:

pip install "git+https://github.com/AllStak/allstak-python.git@develop"

Once 0.1.x ships on PyPI, the canonical install becomes:

pip install allstak

Setup

import os
import allstak

allstak.init(
    api_key=os.getenv("ALLSTAK_API_KEY"),
    environment=os.getenv("APP_ENV", "production"),
    release=os.getenv("ALLSTAK_RELEASE"),
)

allstak.log.info("worker started")
allstak.capture_exception(RuntimeError("checkout failed"))

FastAPI

from fastapi import FastAPI
from allstak.integrations.fastapi import AllStakFastAPI

app = FastAPI()
AllStakFastAPI(app, service="checkout-api")

Flask

from flask import Flask
from allstak.integrations.flask import AllStakFlask

app = Flask(__name__)
AllStakFlask(app)

Django

Add the middleware:

MIDDLEWARE = [
    "allstak.integrations.django.AllStakDjangoMiddleware",
    *MIDDLEWARE,
]

Spans

with allstak.start_span("checkout.authorize", tags={"provider": "payments"}):
    authorize_payment()

Configuration

Option Description
api_key Project API key.
environment Deployment environment.
release App version or commit SHA.
flush_interval_ms Background flush interval.
buffer_size Max buffered events.

Privacy

The SDK redacts common sensitive headers and fields. Avoid putting secrets in custom metadata.

Troubleshooting

  • No events: confirm ALLSTAK_API_KEY is set before allstak.init(...).
  • Missing request telemetry: register the framework integration during app startup.
  • Short-lived script: call allstak.get_client().flush() before exit when a client is initialized.

Contributing and Support

License

MIT

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

allstak-0.1.2.tar.gz (96.5 kB view details)

Uploaded Source

Built Distribution

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

allstak-0.1.2-py3-none-any.whl (90.7 kB view details)

Uploaded Python 3

File details

Details for the file allstak-0.1.2.tar.gz.

File metadata

  • Download URL: allstak-0.1.2.tar.gz
  • Upload date:
  • Size: 96.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for allstak-0.1.2.tar.gz
Algorithm Hash digest
SHA256 593ec6a020fe9af79b745f0c42c9acd209653fa0f2ee23774125a079be232b72
MD5 f80ecac73f533c072fff6bca096a2dd6
BLAKE2b-256 101d5663619bc0460eae6ffbc41fd394beb629f3b04b419af94bbd8ab539d317

See more details on using hashes here.

Provenance

The following attestation bundles were made for allstak-0.1.2.tar.gz:

Publisher: publish.yml on AllStak/allstak-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file allstak-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: allstak-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 90.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for allstak-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9f7de4aec3871f06ca132c3b2446e8771992abf3459a65652eb4da5020922386
MD5 338b2a0075b1a2e6413dde80b68f934f
BLAKE2b-256 774de2a2331d5eebac7165ffd77e02a6dd06ff33bf1f9de02d3c550dea273f70

See more details on using hashes here.

Provenance

The following attestation bundles were made for allstak-0.1.2-py3-none-any.whl:

Publisher: publish.yml on AllStak/allstak-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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