Skip to main content

realuptime-errors

Zero-dependency error tracking SDK for Python (WSGI/ASGI middleware plus manual capture): part of RealUptime Errors.

This is a mirror. It is published from errors-py in the realuptime monorepo by scripts/publish-sdk-mirrors.mjs and is not edited directly; open issues and PRs against this repo, but expect source changes to land here after they merge upstream.

Install

Installable from the package registry (primary) or straight from this mirror's git history (e.g. to pin an exact commit).

pip install realuptime-errors
# or, straight from this mirror
pip install "git+https://github.com/RealUptimeHQ/realuptime-errors-py"

Usage

import realuptime_errors

realuptime_errors.init(
    dsn="https://realuptime.io/api/errors/v1/ingest/rue_...",  # from your project's dashboard
    release="v2.4.1",
    environment="production",
)

realuptime_errors.capture_exception(some_exception)

WSGI: app = realuptime_errors.WsgiMiddleware(app) ASGI: app = realuptime_errors.AsgiMiddleware(app)

What this SDK actually does

  • Never raises out of a public function. Every entry point catches everything; a broken SDK logs once to stderr (prefixed [realuptime-errors]) and goes quiet. An error tracker that crashes the app it watches is worse than none.
  • Scrubs PII by default, client-side, before anything serializes: Authorization/Proxy-Authorization/Cookie/Set-Cookie headers are replaced whole; card-shaped digit runs (Luhn-checked), JWTs, prefixed API keys, and long hex/base64 runs are pattern-scrubbed anywhere they appear in the message, request context, breadcrumbs, or captured source lines. Opt one field back in with allow_fields=["x-request-id"]; there is no global "disable scrubbing" switch, by design.
  • Never silently drops. The in-memory buffer (200 events) evicts the oldest event when full, counts every eviction, and reports the count on the next successful batch, so drops show up on your dashboard instead of disappearing.
  • Standard library only. No third-party imports, ever, checked by a test in this repo (tests/test_wire_contract.py) that scans the source for anything outside an explicit allow-list.

API

Function Notes
init(dsn, release=None, environment=None, allow_fields=None, capture_unhandled=True) Installs a sys.excepthook for unhandled exceptions unless capture_unhandled=False. Safe to call twice; a missing DSN logs once and stays inert.
capture_exception(exc, request=None, fingerprint=None, release=None, environment=None) Reports an exception.
capture_message(message, ...) Reports a plain message.
add_breadcrumb(message, category=None, data=None) Bounded trail (last 20), rides the next event.
flush() Delivers anything buffered.
WsgiMiddleware(app) / AsgiMiddleware(app) Captures unhandled exceptions with minimal request context (method, path), then re-raises.

Version

This mirror tracks SDK_VERSION 0.4.1 in realuptime_errors.py, the string every event actually carries on the wire.

License

MIT, see LICENSE.

Metadata

Release files for realuptime-errors 0.4.1

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

Source distribution (sdist)

Source distribution for realuptime-errors 0.4.1
File Size Uploaded Provenance Actions
realuptime_errors-0.4.1.tar.gz 22.6 kB Without provenance Details for realuptime_errors-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for realuptime-errors 0.4.1
File Interpreter ABI Platform Actions
realuptime_errors-0.4.1-py3-none-any.whl Python 3 none any Details for realuptime_errors-0.4.1-py3-none-any.whl

Total release size: 41.4 kB

Release files / realuptime_errors-0.4.1.tar.gz

Download URL realuptime_errors-0.4.1.tar.gz
Size 22.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b5a6608835eb05ebb03a2a603e54206e9bfaf6d93d12b06a5cdf1f9df3b8dabf
BLAKE2b-256 checksum
How to use checksums
b56d1064246cd357891856a8978375269faad0b1d1641204ed98eb627c5eacc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / realuptime_errors-0.4.1-py3-none-any.whl

Download URL realuptime_errors-0.4.1-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd160c245363c2365e4f793702b495f9e1d68098b77d9dda0da44b78dd3278ba
BLAKE2b-256 checksum
How to use checksums
0a1a55aa720c4fa2af5c214086b24ea6432870ab4df03bc59cb66790c3cda767
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for realuptime-errors 0.4.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files No provenance

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