Send Telegram messages with Python easily. Async-first design with file attachments, bulk messaging, and progress bars.
pip install py-telegram-alert
Built for async/await with synchronous wrappers available for simple scripts.
Send photos, videos, audio, documents, and animations with auto-detection.
Built-in progress visualization for long-running tasks.
Send to multiple chat IDs simultaneously with flexible routing.
HTML and MarkdownV2 support with automatic character escaping.
Send notifications silently without triggering sounds.
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!")