Python exception handler that sends error messages to Slack.
Project description
crybaby
🥲 Micro Python exception handler that sends error messages to Slack. 🚨
Installation
pip install crybaby
Example
import crybaby
def unhandled_exception():
raise Exception("Unhandled exception")
def handled_exception():
try:
raise Exception("Handled exception")
except Exception as e:
crybaby.catch(e)
print(e)
pass
# unhandled exception
if __name__ == "__main__":
crybaby.setup(
slack_token="xoxb-sample-slack-token", slack_channel_id="SLACKCHANNELID"
)
handled_exception()
unhandled_exception()
Then
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
crybaby-0.0.2.tar.gz
(68.6 kB
view details)
Built Distribution
File details
Details for the file crybaby-0.0.2.tar.gz
.
File metadata
- Download URL: crybaby-0.0.2.tar.gz
- Upload date:
- Size: 68.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0595ccb75f363bf1b115a088eea9889eabc4489d4a55ce07b9d35f7de614cd42 |
|
MD5 | f9fa35517778780bd1d59c9418f83908 |
|
BLAKE2b-256 | 6977e3ba2a0a7f4e49b4d79a1fb23b1bdff7608557ac00bdbac5259b9f14803b |
File details
Details for the file crybaby-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: crybaby-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72cbd973dc9e19c3c7a78c4aa14949e402f3d21ae47bc38334b5b1b73ad6218e |
|
MD5 | 50cc311a1a87bf5a6d9ca7d3b001d792 |
|
BLAKE2b-256 | b6e9a711c97477c8dc20bf6bc8531b3c0d0850c031dd63f244bf9a06a5ed5576 |