Wrapper for slack_sdk
Project description
slack_webhook
This is a simple python API for sending messages into a specific slack channel using incoming webhook.
Prerequisite
In order to send messages using incoming webhook into slack, an Application must be configured. This needs to be done from a slack account with administrator rights. This is done on a per slack channel basis.
Request an incoming webhook from the administrator with the name of an existing channel for receiving the alerts.
An unique URL will be generated by the administrator.
Note that there is no authentication mechanism. Anyone (script) with knowledge of this URL will be able to generate messages into this channel.
Following is a (fake) sample of such an URL:
https://hooks.slack.com/services/T02TQT999/B01PZ5XXXXX/GevkYac4s55lE97fXXXXXXX
Installation
pip install slack-webhook-alpa
Usage
from slack_webhook import SlackWebhook, SlackWebhookException
url = 'https://hooks.slack.com/services/XXXXXXXXX/XXXXXXXXX/XXXXXXXXXXXXXXX'
slack_alert = SlackWebhook(url)
slack_alert.send('TEST TEST TEST')
TODO
- support for fancy formatting of message
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
Built Distributions
File details
Details for the file slack-webhook-alpa-0.0.4.tar.gz
.
File metadata
- Download URL: slack-webhook-alpa-0.0.4.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f751963b0747845bc0f54e407f28eabc490a60f29996fc23677809f95e1e2bf3 |
|
MD5 | e51505f79709c047a2dedc800b73c84c |
|
BLAKE2b-256 | 3c5758ca91daff43e60dff0828177ea1d80d42bbab490c51841ad1da9af67078 |
File details
Details for the file slack_webhook_alpa-0.0.4-py3.8.egg
.
File metadata
- Download URL: slack_webhook_alpa-0.0.4-py3.8.egg
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 796377f89059b0df8c7495a68b23ec01383e5d803c0dca0301ad1f1e0869ad3e |
|
MD5 | 6c8f922b93fac8785c73467daf0027d6 |
|
BLAKE2b-256 | 18c8f4cfceee92f6f83c5cd92f1c01164faef25db4680058ef262e2e16fdbceb |
File details
Details for the file slack_webhook_alpa-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: slack_webhook_alpa-0.0.4-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e40decf18e64f866a66d8059d1a64e8e20525632163b221738b4c6f931a02293 |
|
MD5 | 2234a98d9d6d212dad6a810e2aeb97c6 |
|
BLAKE2b-256 | 1db859e5b7ac794c1840938727e20430fb3400dd8e7bcf7e8af2d661854f57cc |