tackbox-report (Python)
Runtime error-capture helper for Python: a thin wrapper over sentry-sdk that
mirrors the Go go/report and JS js/report.js helpers and the tackbox
error-reporting contract. An empty DSN makes every call a log-only no-op, so a
repo can adopt the API before any Glitchtip/Sentry endpoint exists.
This is one runtime arm of tackbox. The static half - the linter that forces
you to call these helpers - ships separately as the tackbox distribution;
installing this helper does not pull the linter, and vice versa.
Install
pip install tackbox-report
Distribution tackbox-report, import package tackbox_report. Requires
Python 3.11+ and sentry-sdk 2.x.
Use
import tackbox_report as report
report.init(report.dsn_from_env()) # empty DSN -> log-only no-op
report.report_error("db write failed", cause=exc, dedup_key="vault.save")
report.report_warn("cache miss", cause=exc, dedup_key="cache.read")
report.report_panic("ipc-loop", recovered) # fatal, fingerprint panic:<name>
report.crumb("ipc", "frame decoded")
# Background work under capture (GoSafe analog):
report.run_task("importer", lambda: do_import()) # threads
report.run_task_async("importer", do_import_async()) # asyncio
Semantics
- Empty DSN = log-only no-op. Safe to call before
init; capture stays disabled and every call still logs locally. - Log-before-drop. Every capture writes one structured local line before the readiness and rate-limit checks, so nothing is lost in log-only mode.
- 60s in-memory rate limit keyed by
dedup_key; the same key is the Sentry fingerprint (grouping). An empty key opts out of rate limiting. - Per-name fingerprints.
panic:<name>forreport_panic,task:<name>forrun_task/run_task_async. - Concurrency-isolated capture. Every capture site forks
new_scope(); the background-task wrappers additionally forkisolation_scope()per thread and per asyncio task, so concurrent captures cannot bleed scope or fingerprint.
See DESIGN.md for the design forks and the sentry-sdk version behavior relied
on.
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 tackbox_report-0.1.0.tar.gz.
File metadata
- Download URL: tackbox_report-0.1.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b9fb99b01503d1cd8296ff321b5b9b9fb7cda0bbae0b06ebfac785d6d5c7cc8
|
|
| MD5 |
93af512a7ff58e681055e7eea786d454
|
|
| BLAKE2b-256 |
b35027b3a3c37b81d2e03a01d248547c6316a8caeeb87a9fb0dbf9bcb577536c
|
Provenance
The following attestation bundles were made for tackbox_report-0.1.0.tar.gz:
Publisher:
publish-report-py.yml on nikitatsym/tackbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tackbox_report-0.1.0.tar.gz -
Subject digest:
6b9fb99b01503d1cd8296ff321b5b9b9fb7cda0bbae0b06ebfac785d6d5c7cc8 - Sigstore transparency entry: 2163701526
- Sigstore integration time:
-
Permalink:
nikitatsym/tackbox@3fcfce65ffef210eea481ef0a50c568f49aeb5fb -
Branch / Tag:
refs/tags/report-py-v0.1.0 - Owner: https://github.com/nikitatsym
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-report-py.yml@3fcfce65ffef210eea481ef0a50c568f49aeb5fb -
Trigger Event:
push
-
Statement type:
File details
Details for the file tackbox_report-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tackbox_report-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.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 |
abbfc01601729921761a0a9d199121a55a6a46e8fed2b7210c66edbace6babb4
|
|
| MD5 |
4e30501cf5135fe14a5fb45e6c0e876f
|
|
| BLAKE2b-256 |
226a202b502676d5d7b9276c21ee05ec6677337d0cd6dbb4dd0640e810eeabf6
|
Provenance
The following attestation bundles were made for tackbox_report-0.1.0-py3-none-any.whl:
Publisher:
publish-report-py.yml on nikitatsym/tackbox
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tackbox_report-0.1.0-py3-none-any.whl -
Subject digest:
abbfc01601729921761a0a9d199121a55a6a46e8fed2b7210c66edbace6babb4 - Sigstore transparency entry: 2163701538
- Sigstore integration time:
-
Permalink:
nikitatsym/tackbox@3fcfce65ffef210eea481ef0a50c568f49aeb5fb -
Branch / Tag:
refs/tags/report-py-v0.1.0 - Owner: https://github.com/nikitatsym
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-report-py.yml@3fcfce65ffef210eea481ef0a50c568f49aeb5fb -
Trigger Event:
push
-
Statement type: