Skip to main content

Send notification via channels

Project description

Shondesh

Shondesh Logo PyPI Version Python versions Coverage Status Snyk PyPI - Downloads Downloads License: MIT

"সন্দেশ" (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.

Features

  • Unified API for sending notifications
  • Pluggable channel support (Email, Telegram, Slack, Webhook)
  • Easy configuration and extension

Installation

pip install shondesh

or with Poetry:

poetry add shondesh

Usage

# 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="your@email.com",
    password="yourpassword"
)
email_channel.send(
    "Hello Email user!",
    to="recipient@example.com",
    subject="Notification from Shondesh"
)

Configuration

Configuration can be provided via environment variables or directly as arguments to channel constructors.

Supported Channels

  • Email
  • Telegram
  • Slack
  • Webhook

Contributing

Contributions are welcome! Please open issues or submit pull requests.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

License

This project is licensed under the MIT License.

Contact

For questions or support, open an issue on GitHub.

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

shondesh-0.1.3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shondesh-0.1.3-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file shondesh-0.1.3.tar.gz.

File metadata

  • Download URL: shondesh-0.1.3.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for shondesh-0.1.3.tar.gz
Algorithm Hash digest
SHA256 3dc305f58bad5ec7e58fe800a50a87c893e14f6cb3920c74286e54c5457c94e0
MD5 5a1b7a9bf19f8f908ef148573ac8a2f3
BLAKE2b-256 434d52e9e10699e5f5c475b6db33393c68b098f12d970eb5ac1885eb7ba6faa9

See more details on using hashes here.

File details

Details for the file shondesh-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: shondesh-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.2 Darwin/24.3.0

File hashes

Hashes for shondesh-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 44100035f87da46be2386e5142d57a9bf569d23d17667086c4e4d1ca31ff392e
MD5 ffff67d35cd7bf8043d7dab41db6ef4c
BLAKE2b-256 52abe58391dc163e39ced878165adc0dcda39c2fda8d709598f84ca48cd3dad4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page