"সন্দেশ" (pronounced shôndesh) in Bengali means news, message, or a type of sweet.
Shondesh is a Python package that provides a unified API for sending notifications across multiple channels.
It supports Email, Telegram, Slack, and Webhook channels, allowing you to easily send messages without worrying about the underlying implementation details.
- Unified API for sending notifications
- Pluggable channel support (Email, Telegram, Slack, Webhook)
- Easy configuration and extension
pip install shondeshor with Poetry:
poetry add shondesh# Slack Example
from shondesh.channels.channel_factory import ChannelFactory
slack_channel = ChannelFactory.create_channel(
"slack",
webhook_url="https://hooks.slack.com/services/your/slack/webhook",
channel="#general"
)
slack_channel.send("Hello from Shondesh!", username="Notifier")
# Telegram Example
telegram_channel = ChannelFactory.create_channel(
"telegram",
webhook_url="https://api.telegram.org/bot<token>/sendMessage",
chat_id="123456789"
)
telegram_channel.send("Hello Telegram user!")
# Webhook Example
webhook_channel = ChannelFactory.create_channel(
"webhook",
url="https://example.com/webhook",
method="POST",
headers={"Authorization": "Bearer yourtoken"}
)
webhook_channel.send({"event": "deploy", "status": "success"})
# Email Example
email_channel = ChannelFactory.create_channel(
"email",
smtp_server="smtp.example.com",
smtp_port=587,
username="[email protected]",
password="yourpassword"
)
email_channel.send(
"Hello Email user!",
to="[email protected]",
subject="Notification from Shondesh"
)Configuration can be provided via environment variables or directly as arguments to channel constructors.
- Telegram
- Slack
- Webhook
Contributions are welcome! Please open issues or submit pull requests.
- Fork the repository
- Create your feature branch (
git checkout -b feature/fooBar) - Commit your changes (
git commit -am 'Add some fooBar') - Push to the branch (
git push origin feature/fooBar) - Create a new Pull Request
This project is licensed under the MIT License.
For questions or support, open an issue on GitHub.
