Skip to main content

Reusable Telegram and Discord notification helpers

Project description

awesome-notify-bridge

Simple notification helpers for sending messages via Telegram Bot API and Discord webhooks.

Installation

pip install awesome-notify-bridge

Quick Start

from notify_bridge import send_telegram_message, send_discord_message

# Send a Telegram message
send_telegram_message(
    chat_id="-1001234567890",
    token="your-bot-token",
    text="Hello from your bot!"
)

# Send a Telegram message with images
send_telegram_message(
    chat_id="-1001234567890",
    token="your-bot-token",
    text="Chart update",
    image_paths=["/path/to/chart.png"]
)

# Send a Discord message
send_discord_message(
    webhook_url="https://discord.com/api/webhooks/...",
    content="Hello from your bot!"
)

API Reference

send_telegram_message(chat_id, token, text, image_paths)

Sends a text message (and optional images) to a Telegram chat using the Bot API.

Parameter Type Default Description
chat_id str required Target chat ID (group, channel, or private)
token str required Telegram bot token from @BotFather
text str "" Message content. Long messages are split automatically
image_paths list[str] None Local file paths of images to send after the text

send_discord_message(webhook_url, content, image_paths, logger)

Posts a message to a Discord channel via webhook.

Parameter Type Default Description
webhook_url str required Discord webhook URL
content str required Message content. Long messages are split automatically
image_paths list[str] None Local file paths of images to attach
logger Callable None Optional callback for logging send status

Links

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

awesome_notify_bridge-0.1.7.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

awesome_notify_bridge-0.1.7-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file awesome_notify_bridge-0.1.7.tar.gz.

File metadata

  • Download URL: awesome_notify_bridge-0.1.7.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for awesome_notify_bridge-0.1.7.tar.gz
Algorithm Hash digest
SHA256 02b6a1f7f7e11b92a1a64c5f3165a4c0091741db91cd68f90fe1aad844b1b9d0
MD5 e89b75ef992f36ed14c3d38bf9f36336
BLAKE2b-256 ddca2bafe50f4b5dec64156d06e195ecd3c072e3a1d59c27fa4e086635ada2e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for awesome_notify_bridge-0.1.7.tar.gz:

Publisher: publish.yml on trunghvbk-afataw/notify-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file awesome_notify_bridge-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for awesome_notify_bridge-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 70c39f558d4e5aa7228515cf99037a0c16f2af24515345943428ee41027167bb
MD5 2f368f8cf243669abef3a3a856b001bc
BLAKE2b-256 cd3b5cd4985fbd7778c785826ac3e4ab8e99ebf604d0bd6c3ae3a2ac342d17d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for awesome_notify_bridge-0.1.7-py3-none-any.whl:

Publisher: publish.yml on trunghvbk-afataw/notify-bridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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