Telegram bot logger that sends strings to telegram chat
Project description
Overview
This package includes simple pure python telegram bot that sends logs to chat.
Algorithm
from logger2telegram import Logger2tlg
tlg = Logger2tlg(chat_id="123456789", bot_id="123456789:ABCDEF1234567890ABCDEF1234567890ABC")
tlg.log("Hello world!")
- Create bot via bot_father bot in telegram
- Insert bot token to class
- Insert chat id to class: https://stackoverflow.com/a/32572159/9142932
- Create instance of logger via
tlg = Logger2tlg(chat_id = "-123456789", bot_id = "BOT TOKEN FROM BOT FATHER")
- Send urgent logs via
tlg.log("This is message")
- You may create multiple loggers to different chats or bots.
Installation
pip install logger2tlg
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
logger2telegram-1.0.1.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for logger2telegram-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a406d595e78cac18345529b934ea9888b27a6676e3a7a5f34a58309e871dc4c4 |
|
MD5 | 9690ff5f917b93330a716b23b80c98ec |
|
BLAKE2b-256 | 77c323b349753fdb375a1e1e7cd6823d40ca04b52cfcbf097e8d545ffdfa5765 |