Registry / communication / slack-notifications

slack-notifications

JSON →
library1.0.1pypypi✓ verified 84d ago

A lightweight Python library for sending notifications to Slack channels with support for attachments and fields. Current version is 1.0.1, with no recent activity; intended for simple notification use cases.

pip install slack-notifications
INSTALL
IMPORT
SIG · SLACK-NOTIFICATION
S
slack-notifications
communicationpythonv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

Slack
from slack_notifications import Slack
The library uses underscores, not hyphens, in the package name.

Initialize with a Slack webhook URL and send a simple message.

import os from slack_notifications import Slack webhook_url = os.environ.get('SLACK_WEBHOOK_URL', 'https://hooks.slack.com/services/...') slack = Slack(webhook_url) slack.send("Hello from slack-notifications!")
Debug
Known issues
gotchaPackage name on PyPI uses hyphens (slack-notifications), but import uses underscores (slack_notifications).
fix
Use `from slack_notifications import Slack` when importing.
affects: all
gotchaThe library only supports webhook-based messaging, not Slack API tokens or Slash commands.
fix
Ensure you have a valid Slack Incoming Webhook URL. If you need OAuth tokens, use slack-sdk instead.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'slack_notifications'
Installed the wrong package name (e.g., 'slack' or 'slackclient').
fix
Run `pip install slack-notifications` and import as `from slack_notifications import Slack`.
requests.exceptions.InvalidSchema: No connection adapters were found for 'https://hooks.slack.com/services/...'
Webhook URL is malformed or missing protocol.
fix
Verify the webhook URL starts with 'https://hooks.slack.com/'. Ensure SLACK_WEBHOOK_URL is set correctly.
Upgrade
Version history
1.0.1latest on PyPI · released Jul 23, 2024
Audit
Dependencies
requestsrequiredHTTP client for Slack webhook calls
Agent activity
26 hits · last 30 days
node
24
OpenAI (training)
1
Resources
slack-notifications — pip install slack-notifications · libregistry