Registry / communication / slack-webhook

slack-webhook

JSON →
library1.0.7pypypi✓ verified 84d ago

slack-webhook is a Python client library for Slack Incoming Webhooks, supporting Python 3.6 and above. Version 1.0.7 is the latest release, with infrequent updates.

pip install slack-webhook
INSTALL
IMPORT
SIG · SLACK-WEBHOOK
S
slack-webhook
communicationpythonv1.0.7
Install
1.5s avg
Import
91ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.096s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.086s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Slack
from slack_webhook import Slack
from slackwebhook import Slack
The package name uses underscores: slack_webhook, not slackwebhook.

Sends a simple text message to a Slack channel via an Incoming Webhook URL.

from slack_webhook import Slack webhook_url = os.environ.get('SLACK_WEBHOOK_URL', '') slack = Slack(url=webhook_url) slack.post(text="Hello, Slack!")
Debug
Known issues
gotchaThe webhook URL passed to Slack() must be the full URL, including 'https://hooks.slack.com/services/...'. Omitting the protocol or path will cause a connection error.
fix
Ensure the URL is copied exactly from the Slack App configuration.
affects: all
gotchaThe Slack client does not verify the webhook URL or handle errors gracefully. Invalid URLs or network issues may raise unhandled exceptions.
fix
Wrap calls in try/except blocks and check the response status.
affects: all
deprecatedThe library is not actively maintained; last release was in 2020. Consider using the official slack-sdk library for webhooks.
fix
Migrate to slack_sdk.webhook.WebhookClient from the slack-sdk package.
affects: >=1.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'slack_webhook'
Package installed but import path is wrong (e.g., 'import slackwebhook' without underscore).
fix
Use: from slack_webhook import Slack
requests.exceptions.MissingSchema: Invalid URL 'hooks.slack.com/services/...': No scheme supplied
Webhook URL provided without 'https://' prefix.
fix
Ensure the webhook URL starts with 'https://'.
AttributeError: module 'slack_webhook' has no attribute 'Slack'
Import statement uses 'import slack_webhook' but tries to access Slack class incorrectly.
fix
Use: from slack_webhook import Slack
Upgrade
Version history
1.0.7latest on PyPI · released Dec 15, 2021
Audit
Dependencies
requestsrequiredNeeded for HTTP requests to Slack webhook URLs.
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
slack-webhook — pip install slack-webhook · libregistry