Skip to main content

Wrapper for slack_sdk

Project description

slack_webhook

This is a simple wrapper over the slack_sdk for sending messages into a specific slack channel.

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

slack-webhook-alpa-0.0.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

slack_webhook_alpa-0.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file slack-webhook-alpa-0.0.1.tar.gz.

File metadata

  • Download URL: slack-webhook-alpa-0.0.1.tar.gz
  • Upload date:
  • Size: 2.7 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

Hashes for slack-webhook-alpa-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b85723dc2c45f39f9f158130ef8729ef9deda4701a32c3a4963c0ca0005a51e1
MD5 fd45f0cc5d09ca2b8c04404fe6bcfdef
BLAKE2b-256 475c11583e0e18ef7a97ef855b8a2bbebb6ba096021f2fea8e3459e6318f9c1b

See more details on using hashes here.

File details

Details for the file slack_webhook_alpa-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: slack_webhook_alpa-0.0.1-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

Hashes for slack_webhook_alpa-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d049883d998fb59a16491a0143d8dac3599637db94542bcc7a17769a14250c8b
MD5 948fd99aabab6e2c78eb9f44b5c4aab9
BLAKE2b-256 05ee27b775afcf5fdbd2e671e1d6dc5e1aa3da9d9a46224728e3f5086ad58157

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