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 Distribution

crybaby-0.0.3.tar.gz (68.5 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file crybaby-0.0.3.tar.gz.

File metadata

  • Download URL: crybaby-0.0.3.tar.gz
  • Upload date:
  • Size: 68.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.7.13

File hashes

Hashes for crybaby-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c810445c9194b1018d2de6cf4fb223c5d14132bbe3d0252aff7746711f2a579c
MD5 b82a2ea77eea9c0e585913bfbe6b12af
BLAKE2b-256 4edc8e966ea218ed09b2dc2a10e8af5820cfd766455f21a50c9d164bba6c3a0a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: crybaby-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ba6005c9f8d3bb53cd07d52265ef97d9ac958f4c9bcec7fde543aa9ced255839
MD5 346d2ef182530b94995bd4a7fbe8dfc4
BLAKE2b-256 523d4b4c9f813bd96b480e4bbc7a50455146418b94cadfc5a5a5e0ec3f3102eb

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