Skip to content

🚨 Simple Slack alerting python library

Notifications You must be signed in to change notification settings

etienne-napoleone/slack-alerts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • Poetry - Python dependency management made great
  • Requests - The famous and robust http client library

About

🚨 Simple Slack alerting python library

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages