Skip to main content

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)


if __name__ == "__main__":
    crybaby.setup(
        slack_token="xoxb-sample-slack-token", slack_channel_id="SLACKCHANNELID"
    )
    handled_exception()
    unhandled_exception()

Then

slack_example.png

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

crybaby-0.0.4-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file crybaby-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: crybaby-0.0.4-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

Hashes for crybaby-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0fed3853a4372a3f5bbcfcd77d86b6062bca236e9e96b994cf90c43468d5441c
MD5 b86c72fb4e6e73aa226f697835980cb2
BLAKE2b-256 2caf97e4ad5428805b7c1946beef85375440376ae43415de5299498bac8ab7ae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page