Skip to main content

bugtape (Python)

Report Python server errors to BugTape, with error messages redacted before they leave your process.

pip install bugtape
# before the PyPI release: pip install https://app.bugtape.ai/sdk/python/bugtape-0.1.0-py3-none-any.whl
import bugtape

bugtape.init(service="analytics", release="2026.09.28")  # key from BUGTAPE_KEY

That reports:

  • uncaught exceptions in the main thread and in threads,
  • logging records at ERROR and above (with their exception when there is one),
  • anything you pass to bugtape.capture_exception() or bugtape.capture_message(),
  • uncaught exceptions in Streamlit pages (turned on automatically when Streamlit is imported).

What leaves your server

  • The exception type, a redacted message, and the stack: file, function and line for each frame.
  • Never frame locals or source lines.
  • Redaction replaces quoted values, numbers and amounts, emails, SQL, URLs with credentials, cloud paths and ids. KeyError: 'Acme Pty Ltd' is sent as KeyError: '[redacted]'. Python type names such as 'int' are kept.
  • Redaction works by pattern: a bare name written into a message (f"no rate for {client}") is not recognised. Log arguments (log.error("failed for %s", client)) are never sent.
  • Add your own patterns with extra_redactions=[(r"regex", "[replacement]")], inspect and change every report with before_send=lambda payload: payload, or send only the exception type with send_messages=False.

Streamlit

import streamlit as st
import bugtape

bugtape.init(service="analytics")  # Streamlit is detected; page errors are reported

st.title("Revenue")

Errors still appear in the app exactly as before. Each report names the page and the Streamlit session.

Datadog

If your app runs ddtrace, each report carries the active trace and span ids, and the BugTape console links to the trace in Datadog. BugTape never starts Datadog itself.

Options

Option Default
api_key BUGTAPE_KEY Capture key (bt_live_… / bt_test_…)
service BUGTAPE_SERVICE, DD_SERVICE, app Name of this app
release / environment BUGTAPE_RELEASE, DD_VERSION / BUGTAPE_ENVIRONMENT, DD_ENV
endpoint https://app.bugtape.ai/v1/ingest
redact True Turn message redaction off only for data you know is safe
capture_uncaught / capture_logging True
streamlit auto True to require it, False to skip

Reports are sent from a background thread with a 5 second timeout and at most 30 per minute. BugTape never raises into your app.

Docs: https://bugtape.ai/docs/python/

Metadata

Release files for bugtape 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bugtape 0.1.0
File Size Uploaded
bugtape-0.1.0.tar.gz 24.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bugtape 0.1.0
File Interpreter ABI Platform
bugtape-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 78.8 kB

Release files / bugtape-0.1.0.tar.gz

Download URL bugtape-0.1.0.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
770482a97551b7d5561bd7e8cf878d1f64aedaba810a59afd777783248fde3cc
BLAKE2b-256 checksum
How to use checksums
0a93cd46f09cfbb3fa0205b90581dea950dda1454ded773d7fccfbdfa698a31a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 1, 2026.

Transparency log

Release files / bugtape-0.1.0-py3-none-any.whl

Download URL bugtape-0.1.0-py3-none-any.whl
Size 54.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84bb8a50e516b2861b262e1ed3900deb7ff61d5efcdf8b88ad239afdcfcc0b82
BLAKE2b-256 checksum
How to use checksums
32ca98e6bc3afc95eb7c9c3a6a24adb1989d24ad1f14429ef8b3652546e6ea59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 1, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

2 release 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