Skip to main content

Telegram bot logger that sends strings to telegram chat

Project description

Overview

PyPI Version

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!")
  1. Create bot via bot_father bot in telegram
  2. Insert bot token to class
  3. Insert chat id to class: https://stackoverflow.com/a/32572159/9142932
  4. Create instance of logger via tlg = Logger2tlg(chat_id = "-123456789", bot_id = "BOT TOKEN FROM BOT FATHER")
  5. Send urgent logs via tlg.log("This is message")
  6. You may create multiple loggers to different chats or bots.

Installation

pip install logger2tlg

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

logger2telegram-1.0.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

logger2telegram-1.0.1-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page