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.3.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: slack-webhook-alpa-0.0.3.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

Hashes for slack-webhook-alpa-0.0.3.tar.gz
Algorithm Hash digest
SHA256 9b82c6c80e4e74c4c4cc2e34d0d36a2353611c43f8de7af9c36c7a51479981d5
MD5 c08c324deedd8d82b29000c52654c4e0
BLAKE2b-256 726d1ad234ec11f1dd62f055ad01211f5ad710342d70a76cf06c7e32747132a4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slack_webhook_alpa-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0339d98a1347fdf6be38c6e32a5c601330b14a7b319b761e6df2a821ff3a51af
MD5 4deca9b0c4ae34a79280fdebdbf0abc8
BLAKE2b-256 e152eccefd814b94399e0823bbbf22d6d0376a5c05fe68bdbfdff66f29fa6b80

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