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
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
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_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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file allstak-0.1.3.tar.gz.
File metadata
- Download URL: allstak-0.1.3.tar.gz
- Upload date:
- Size: 97.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a48c43e36351435bdbe2d9d097445d52cd626cf53b31e984a0b1866795bc09f
|
|
| MD5 |
4d82d62244d850898dea53a2f1adae4d
|
|
| BLAKE2b-256 |
bdb6e7b3d4dfd01cde6c723dab71ba7bd13aa566cf0950404eaadd6c6933bc75
|
Provenance
The following attestation bundles were made for allstak-0.1.3.tar.gz:
Publisher:
publish.yml on AllStak/allstak-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
allstak-0.1.3.tar.gz -
Subject digest:
7a48c43e36351435bdbe2d9d097445d52cd626cf53b31e984a0b1866795bc09f - Sigstore transparency entry: 1663547976
- Sigstore integration time:
-
Permalink:
AllStak/allstak-python@cb58bf37d167fc820ebde873e570d6a7eeb15448 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/AllStak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cb58bf37d167fc820ebde873e570d6a7eeb15448 -
Trigger Event:
release
-
Statement type:
File details
Details for the file allstak-0.1.3-py3-none-any.whl.
File metadata
- Download URL: allstak-0.1.3-py3-none-any.whl
- Upload date:
- Size: 90.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eafc8e53e25bf58faae19f32c8caf5b7068170f024dfdadb4bc020f09218b83e
|
|
| MD5 |
db6e799a4be4b7efa117ca69a6dd2e56
|
|
| BLAKE2b-256 |
d14270569f8b36a1814140af339234facf7f646a83b0c63a039b675d2e4d4aee
|
Provenance
The following attestation bundles were made for allstak-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on AllStak/allstak-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
allstak-0.1.3-py3-none-any.whl -
Subject digest:
eafc8e53e25bf58faae19f32c8caf5b7068170f024dfdadb4bc020f09218b83e - Sigstore transparency entry: 1663548190
- Sigstore integration time:
-
Permalink:
AllStak/allstak-python@cb58bf37d167fc820ebde873e570d6a7eeb15448 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/AllStak
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cb58bf37d167fc820ebde873e570d6a7eeb15448 -
Trigger Event:
release
-
Statement type: