You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

telegram-error-alerter

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

telegram-error-alerter

Send error to telegram group via bot

1.0.1
pipPyPI
Maintainers
1

============================================================== Handle errors and send it Telegram group!

import Alerter

tg_alert = Alerter(bot_token='YOUR_BOT_TOKEN', chat_id='YOUR_CHAT_ID') #or tg_alert = Alerter.from_environment() #Recommend

method_1: tg_alert.send_message(chat_id=111222333, text='Message text') #or method_2: as decorator @tg_alert def some_func_that_can_raise_an_exception(): raise RuntimeError('this is an exception')

We could use in except scope as: except Exception as e: return tg_alert.custom_alert(text=e)

Keywords

sms

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts