Skip to main content

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> for report_panic, task:<name> for run_task / run_task_async.
  • Concurrency-isolated capture. Every capture site forks new_scope(); the background-task wrappers additionally fork isolation_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

tackbox_report-0.1.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

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

tackbox_report-0.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

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

Hashes for tackbox_report-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6b9fb99b01503d1cd8296ff321b5b9b9fb7cda0bbae0b06ebfac785d6d5c7cc8
MD5 93af512a7ff58e681055e7eea786d454
BLAKE2b-256 b35027b3a3c37b81d2e03a01d248547c6316a8caeeb87a9fb0dbf9bcb577536c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tackbox_report-0.1.0.tar.gz:

Publisher: publish-report-py.yml on nikitatsym/tackbox

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

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

Hashes for tackbox_report-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 abbfc01601729921761a0a9d199121a55a6a46e8fed2b7210c66edbace6babb4
MD5 4e30501cf5135fe14a5fb45e6c0e876f
BLAKE2b-256 226a202b502676d5d7b9276c21ee05ec6677337d0cd6dbb4dd0640e810eeabf6

See more details on using hashes here.

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

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

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

0.0.0

2 files

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