Skip to main content

Send notification via channels

Project description

Shondesh

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

"সন্দেশ" (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.2.tar.gz (5.5 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.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: shondesh-0.1.2.tar.gz
  • Upload date:
  • Size: 5.5 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.2.tar.gz
Algorithm Hash digest
SHA256 3c98c27251c8d8cad433baf9b6a689acac54920d7291775955933af195e63c7c
MD5 77dde69d50e941d4550e4e089f814a5f
BLAKE2b-256 f00aaf342ae369746e45af795b2e920d37cf6dc0faf2b4891f062a60c0e60acf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shondesh-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.7 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 08fea650102fe94f60c1a89188bd905539bfa66a51c8bcdb4c36f6ddb7d0fe52
MD5 23ab5f799fabf826d46f1ff92ceabcfb
BLAKE2b-256 cb08c6a3b9f702ab3a5f38f6e503efd55f332d171ec2f8926848f8113ddd61cc

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