tg-notify
CMDOP Skill — install and use via CMDOP agent:
cmdop-skill install tg-notify
Rate-limited Telegram notifications with priority queue.
Install
pip install tg-notify
Quick Start
export TELEGRAM_BOT_TOKEN="your-bot-token"
export TELEGRAM_CHAT_ID="-1001234567890"
from tg_notify import send_telegram_message
send_telegram_message("Hello from tg-notify!")
Shortcuts
from tg_notify import send_error, send_success, send_warning, send_info, send_stats, send_alert
send_error("DB connection failed", {"host": "db.example.com"})
send_success("Deploy complete", {"version": "1.2.3"})
send_warning("Disk usage high", {"usage": "89%"})
send_info("New user registered", {"email": "user@example.com"})
send_stats("Daily Report", {"users": 1500, "revenue": "$3200"})
send_alert("Server down!", {"server": "prod-1"})
TelegramSender
from tg_notify import TelegramSender
sender = TelegramSender(bot_token="your-token", chat_id=-123456)
sender.send_message("Hello!")
sender.send_photo("chart.png", caption="Daily stats")
sender.send_document("report.pdf")
Priority Queue
Messages are queued with 4 priority levels and rate-limited to 20 msg/sec:
| Priority | Use case |
|---|---|
CRITICAL (1) |
Security alerts, system down |
HIGH (2) |
Errors, important warnings |
NORMAL (3) |
Info, success messages |
LOW (4) |
Stats, debug |
Auto-cleanup drops low-priority messages when queue fills up.
from tg_notify import telegram_queue
# Flush before exit (CLI scripts)
telegram_queue.flush(timeout=5)
License
MIT
Metadata
Release files for tg-notify 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tg_notify-0.1.10.tar.gz | 10.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tg_notify-0.1.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.0 kB
Release files / tg_notify-0.1.10.tar.gz
| Download URL | tg_notify-0.1.10.tar.gz |
|---|---|
| Size | 10.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
efcc87cdbc079d862fd8422d4d6f94ff2e37606a3f37d0deea87942e7cf01a81
|
|
BLAKE2b-256 checksum How to use checksums |
728693fb930a1b8f6d24c435d013c22aa4e6a6e752d91be663476b28b7936354
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.18
|
Release files / tg_notify-0.1.10-py3-none-any.whl
| Download URL | tg_notify-0.1.10-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c5da49f9eb8ce939ae4986a4333a40f99efbdb48ac9fb637d5e4fc5a74238a7
|
|
BLAKE2b-256 checksum How to use checksums |
fba3e0cfb641c90767e11ff603e81770e0dee087823f87e6bb8617637458ad29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.18
|