Skip to main content

Slack Crash Alerter Client using Incoming Webhooks

Project description

Slack Alerter

Slack Slack Alerts, Automated Crash Alerts for your projects

A Python package for sending alerts to Slack channels using webhooks. This package allows you to easily notify users about important events or errors in your application, improving monitoring and response times.

Features

  • Customizable Alerts: Send alerts with specific headers and messages.
  • Automatic Exception Handling: Automatically log and notify about unhandled exceptions and threading issues.
  • Retry Mechanism: Configurable retries for sending alerts, ensuring reliable notifications.

Installation

You can install the package via pip:

pip install slack-alerter

Usage

Basic Example

Here’s a quick example of how to use the slack_alerter package:

from slack_alerter import Alerts
import sys
import threading

# Initialize the Alerts class
al = Alerts(
    module_name="alerter_test",
    slack_alerts_webhook='https://hooks.slack.com/services/your/webhook/url'
)

# Send a test alert
al.alert("Custom Header", "This is a custom alert message.")

# Set up exception handling
sys.excepthook = al.handle_exception
threading.excepthook = al.handle_threading_excepthook

Configuration

The following configuration parameters are required for initializing the Alerts class:

  • slack_alerts_webhook: Your Slack webhook URL (mandatory).
  • module_name: The name of your module (mandatory).

License

This project is licensed under the MIT License. See the LICENSE file for details.

Author

Hritik Karwasra - https://github.com/hritikkarwasra

Acknowledgments

Thanks to the Slack API for providing the webhook functionality that makes this package possible.

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

slack_alerter-0.1.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slack_alerter-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file slack_alerter-0.1.1.tar.gz.

File metadata

  • Download URL: slack_alerter-0.1.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for slack_alerter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 eecddf148d057b520ee365b1e63b2e5c2e1371423404e09f031f519306fa30ff
MD5 a21efe5975e022cd158c852458c849dd
BLAKE2b-256 996537683d8e132c479b83b7f0284d7662a85746b7f8adcc63c71cc1df845c85

See more details on using hashes here.

File details

Details for the file slack_alerter-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: slack_alerter-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for slack_alerter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8da88bc2bcb55073b43994f9865422f40d2476f4ae37206095d59aa833c40df2
MD5 18dc61b74a23e5abd0d3f009d60f3b3e
BLAKE2b-256 315f225febed7f9f562871b770e3b25030bb33e35ec3ff37863c40503edd7b56

See more details on using hashes here.

Supported by

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