Alerting: Easy to Use alerting library for Python
Project description
Alerting
Easy to use alerting library for Python 3+
Tested with:
- Python 3.6-3.10
Use the following command to install using pip:
pip install alerting
Sample
from alerting import Alerting
from alerting.clients import AlertingMailGunClient, AlertingSlackClient, AlertingTelegramClient
my_alerts = Alerting(
clients=[
AlertingSendGridClient(sendgrid_api_key, from_email),
AlertingMailGunClient(your_mailgun_api_key, your_domain, from_email, target_email),
AlertingSlackClient(your_bot_user_oauth, target_channel),
AlertingTelegramClient(bot_token, chat_id)
]
)
try:
# something
except Exception as ex:
my_alerts.send_alert(title='some bad error happened', message=str(ex))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
alerting-0.0.9.3.tar.gz
(5.5 kB
view hashes)
Built Distribution
Close
Hashes for alerting-0.0.9.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 951b432a8e73819fcb09af1d7bb7b787ec262de95bb34628b46b2c2f48250b8c |
|
MD5 | 8af7c589144e3c3272214a7b9677f6a3 |
|
BLAKE2b-256 | f55e933309c631f63dce893c17883e54421232cd848da85095ee7e8d554cb24f |