py-telegram-alert

Send Telegram messages with Python easily. Async-first design with file attachments, bulk messaging, and progress bars.

Python 3.11+ Async/Await GPL-3.0
pip install py-telegram-alert

Features

âš¡

Async-First

Built for async/await with synchronous wrappers available for simple scripts.

📎

File Attachments

Send photos, videos, audio, documents, and animations with auto-detection.

📊

Progress Bars

Built-in progress visualization for long-running tasks.

📢

Bulk Messaging

Send to multiple chat IDs simultaneously with flexible routing.

✨

Rich Formatting

HTML and MarkdownV2 support with automatic character escaping.

🔇

Silent Mode

Send notifications silently without triggering sounds.

Quick Start

example.py
from telegram_alert import TelegramAlert

# Initialize with your bot token and chat ID
alert = TelegramAlert()

# Send a simple message
alert.send_sync("Deployment complete!")

# Send with formatting
alert.send_sync(
    "<b>Status:</b> Success\n<code>Build #1234</code>",
    parse_mode="HTML"
)

# Send a file
alert.send_file_sync("report.pdf", caption="Daily report")

# Async usage
async def main():
    await alert.send("Async message!")