Skip to main content

error-alerts

Python error alerts via Telegram

Installation: pip install error-alerts

Options:

token: Bot Telegram token.

channel: Your Telegram channel ID where you want the alerts to be sent.

full_error: Send full traceback with line of code where error occurred (False by default and shown in sample below).

raise_error: Raise error and exit code when there is an error. If this is not set to True an alert will be sent and the code will continue running (False by default).

Usage:

from error_alerts import alerts

alerts = alerts(token='TELEGRAM_TOKEN', channel=TELEGRAM_CHANNEL_ID, full_error=True, raise_error=True)

try:
    1 / 0
except Exception as error:
    alerts.send(title='Test', exception=error)

Output:

Test: Traceback (most recent call last):
  File "A:\Code\Python\packages\handler\test.py", line 6, in <module>
    1 / 0
ZeroDivisionError: division by zero

Prints that in console and sends a Telegram alert to the channel you specified

Metadata

Release files for error-alerts 6.3

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

Source distribution (sdist)

Source distribution for error-alerts 6.3
File Size Uploaded Provenance Actions
error-alerts-6.3.tar.gz 3.0 kB Without provenance Details for error-alerts-6.3.tar.gz

Release files / error-alerts-6.3.tar.gz

Download URL error-alerts-6.3.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ae7a8102fe17add09bfd115317174f7d071ddd2c6331972ff221a757653ea337
BLAKE2b-256 checksum
How to use checksums
3177c5fca19b15a883af221b8595f812fbf695158573466b47acf96462e5d547
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Security for error-alerts 6.3

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

6.3 This release

1 release file 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