BugsRadar for Python
Errors of your Python application in Telegram, Discord or Pushover: the standard logging module, uncaught exceptions and direct calls in one package. Python 3.9 and later, no dependencies outside the standard library.
Full documentation: https://bugsradar.com/docs/python/
You need a BugsRadar project with a channel and the project's API key: create them at https://app.bugsradar.com/.
Install
pip install bugsradar
Set it up
Once, at the start of the program:
import os
import bugsradar
bugsradar.init(
api_key=os.environ["BUGSRADAR_KEY"],
environment="Production", # optional
)
The API key is secret: use it only in code that runs on your servers. Never put it in a desktop app you ship to others (PyInstaller, PySide or PyQt builds) or in a public repository: anyone can take the key out of them. For such apps, public keys are on the way: https://bugsradar.com/docs/#public-keys
From here on, records at ERROR and above from every logger and uncaught exceptions go to BugsRadar. init adds no handlers: your logging setup works as before. Django, Flask and Uvicorn log unhandled exceptions of requests, so init covers them too.
logging
logger.exception("Order %s failed", order_id)
The format string becomes the message template, so failures of different orders are one error with a count.
Direct calls
try:
create_order(order_id)
except Exception as error:
bugsradar.send_exception(error, module="Orders")
send and send_exception queue the event and return at once; nothing raises.
Before the program exits
init registers an atexit hook that waits up to shutdown_timeout (5 s) for queued reports. In a short script you can also wait yourself:
bugsradar.flush()
Questions: support@bistriy.com
Release files for bugsradar 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bugsradar-3.0.0.tar.gz | 13.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bugsradar-3.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.8 kB
Release files / bugsradar-3.0.0.tar.gz
| Download URL | bugsradar-3.0.0.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5142dcce4d3b7ac133737c4fcda42b28ca6c081aa4479d2d1adacf0c4d7fd4a9
|
|
BLAKE2b-256 checksum How to use checksums |
54d06324cf17fbd97fc3abd954a45d141df31da3266ac74371aa39a08b936c52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / bugsradar-3.0.0-py3-none-any.whl
| Download URL | bugsradar-3.0.0-py3-none-any.whl |
|---|---|
| Size | 18.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cbe328ff24029e37e63f5cd6a0e2b590721787bc4ae15b04caf319076b45162f
|
|
BLAKE2b-256 checksum How to use checksums |
f10a74fe0dead4506b9baf020f23776beb1f40bf40ac7a03e050fada6395acd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|