prodbat (Python)
Monitoring for apps built with AI. This package sends a Python app's server errors, log lines, scheduled-job check-ins, job queue health and Stripe events to Prodbat. It has no dependencies, never raises, and never holds a request up: reports go out from a background thread and are dropped if Prodbat can't be reached.
Install
pip install prodbat
Set PRODBAT_KEY and PRODBAT_URL in the environment (npx prodbat init writes them to .env).
- FastAPI, Starlette, any ASGI app:
app.add_middleware(prodbat.ASGIMiddleware) - Flask:
prodbat.flask(app) - Django: add
"prodbat.django.Middleware"toMIDDLEWARE - Any WSGI app:
app = prodbat.WSGIMiddleware(app)
Each one reports every exception with its traceback and route, and other 5xx answers.
Also
import logging
import prodbat
prodbat.log("refund issued", order=1042) # a log line, with fields
logging.getLogger().addHandler(prodbat.LogHandler()) # or send what the app already logs
prodbat.ping("nightly-email", every="24h") # at the end of a scheduled job, after it succeeded
prodbat.stripe_event(event) # in the Stripe webhook, after the signature check
prodbat.capture_exception(route="POST /x") # report the current exception yourself
prodbat.queues.watch_celery(celery_app) # Celery: where the app is defined
prodbat.queues.watch_rq([queue]) # RQ
prodbat.queues.report("emails", waiting=3, oldest_seconds=12) # any other queue, once a minute
Each queue watcher reports every minute how many jobs are waiting, how long the oldest has waited, and how many failed. Prodbat tells you when a queue is stuck, has gone quiet, or is failing.
Tests
python -m pytest
MIT licence.
Metadata
Release files for prodbat 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| prodbat-0.0.1.tar.gz | 9.8 kB | With provenance | Details for prodbat-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| prodbat-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for prodbat-0.0.1-py3-none-any.whl |
Total release size: 19.2 kB
Release files / prodbat-0.0.1.tar.gz
| Download URL | prodbat-0.0.1.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a26359a6507cd811cee9c21c17a6c9b6213574ffe0155617f3d3bf2420052585
|
|
BLAKE2b-256 checksum How to use checksums |
f86b981bc0b812eeb726b991fbec3fca688cad9286fa68bebfb785734e4ad68a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 18, 2026.
Transparency logRelease files / prodbat-0.0.1-py3-none-any.whl
| Download URL | prodbat-0.0.1-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfacc8bca13e4d17abbe4f622ac40859ff5bb1314c45ebd70c963a6f6c8cda9c
|
|
BLAKE2b-256 checksum How to use checksums |
9d83e841dabe66e9347e7503aab0a20799ab3d8f94c3de2d8d59667a69844997
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 18, 2026.
Transparency logSecurity for prodbat 0.0.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for prodbat-0.0.1.tar.gz
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 Nov 18, 2026.
Transparency logA 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.