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
pip install allstak
Framework extras are opt-in so the base install stays minimal:
pip install "allstak[fastapi]" # FastAPI/Starlette helpers
pip install "allstak[flask]" # Flask helpers
pip install "allstak[django]" # Django middleware + integrations
pip install "allstak[sqlalchemy]" # SQLAlchemy query telemetry
pip install "allstak[all]" # everything above
Requires Python 3.9+. Wheels are universal (py3-none-any). Every release is
built reproducibly under a pinned SOURCE_DATE_EPOCH, validated via
twine check --strict, smoke-installed on Python 3.10/3.11/3.12, and
uploaded via PyPI Trusted Publishers (OIDC) with PEP 740 Sigstore
attestations.
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
After allstak.init(...), FastAPI / Starlette apps are auto-instrumented — no
extra line needed:
import allstak
from fastapi import FastAPI
allstak.init(api_key="ask_live_...")
app = FastAPI() # inbound request telemetry + error capture are already wired
To attach explicitly (or to set a service name / disable the auto-attach via
allstak.init(..., capture_fastapi=False)):
from fastapi import FastAPI
from allstak.integrations.fastapi import AllStakFastAPI
app = FastAPI()
AllStakFastAPI(app, service="checkout-api")
Logs
allstak.init(...) auto-attaches the logging bridge (disable with
capture_logs=False), so standard-library logs flow to AllStak with no extra
code. ERROR/CRITICAL records become error events (with the exception + stack
for logger.exception(...)), and lower levels become breadcrumbs:
import logging
logging.getLogger("checkout").error("payment declined")
try:
charge()
except Exception:
logging.getLogger("checkout").exception("charge crashed") # captured with stack
Flask
from flask import Flask
from allstak.integrations.flask import AllStakFlask
app = Flask(__name__)
AllStakFlask(app)
Django
Add "allstak" to INSTALLED_APPS and the SDK auto-inserts its request
middleware for you — no manual MIDDLEWARE edit needed:
INSTALLED_APPS = [
# ...
"allstak",
]
ALLSTAK = {
"api_key": "ask_live_...",
"environment": "production",
# "auto_middleware": False, # opt out of auto-insertion
}
Prefer to wire it by hand? Add the middleware at the front of the stack
(AllStakDjangoMiddleware is an alias of the same class):
MIDDLEWARE = [
"allstak.integrations.django.AllStakMiddleware",
*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_KEYis set beforeallstak.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
- Report bugs with the GitHub bug report template: https://github.com/AllStak/allstak-python/issues/new/choose
- Open pull requests using the checklist in CONTRIBUTING.md.
- Report security vulnerabilities privately through SECURITY.md.
License
MIT
Metadata
Release files for allstak 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| allstak-0.2.1.tar.gz | 134.9 kB | With provenance | Details for allstak-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| allstak-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for allstak-0.2.1-py3-none-any.whl |
Total release size: 247.6 kB
Release files / allstak-0.2.1.tar.gz
| Download URL | allstak-0.2.1.tar.gz |
|---|---|
| Size | 134.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
59412012899b91be25ed17248dda7a0bd5ce6c9ffcccd7c313871304f66328e7
|
|
BLAKE2b-256 checksum How to use checksums |
4bd3de7809c6284f6513595f78822d2e5637408ab3c2e5ac2ec1322659deb87a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 6, 2026.
Transparency logRelease files / allstak-0.2.1-py3-none-any.whl
| Download URL | allstak-0.2.1-py3-none-any.whl |
|---|---|
| Size | 112.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9fe650a6a69afd45c8d459f97d96afa3e78e3c9c323b33ccdbe268126ef663d1
|
|
BLAKE2b-256 checksum How to use checksums |
5b25603355138217f531b3f1d74641853ee9f48f7a23c06e0b8dd4081b47350c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 6, 2026.
Transparency logSecurity for allstak 0.2.1
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.
Attestation for allstak-0.2.1.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 Jun 6, 2026.
Transparency logA 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.