Simple Slack alerting python library
Project description
SLACK-ALERTS
SIMPLE SLACK ALERTING PYTHON LIBRARY
────
Usage
import slack_alerts
alerter = slack_alerts.Alerter('https://your-slack.webhook/url')
alerter.critical('something bad happened!!')
Installation
With pip
pip3 install --user slack_alerts
As a dependency
# with poetry
poetry add slack_alerts
# with virtualenv
virtualenv -p python3 .env
source .env/bin/activate
pip install slack_alerts
# with pipenv
pipenv install slack_alerts
Tests
Run pytest for unit tests
# you need a valid slack webhook url as there is no api mocking
export SLACK_WEBHOOK_URL='https://...'
poetry run coverage run --source slack_alerts -m pytest -v
poetry run coverage report
Run flake8 for code style
poetry run flake8 .
Built With
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
slack-alerts-1.0.0.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for slack_alerts-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11c1ca9d2f9d97b5a5a59dd9fb5781b45fa6ca76661a95acc72c76c090f803f7 |
|
MD5 | 1d6d6dc29e167f099cc83cb475fa6716 |
|
BLAKE2b-256 | a2a92114e19fec8fc9d649b9de8bb9003dba36053f5654e106714acd700a88fc |