rsudp.c_telegram (Telegram alerts)

class rsudp.c_telegram.Telegrammer(token, chat_id, q=False, send_images=False, sender='Telegram')

New in version 0.4.2.

Telegram is a free messaging service which, among other things, is suited to quickly broadcasting automatic notifications via an API. It is used by the Mexican Early Warning System (SASMEX) and PanamaIGC.

Parameters
  • token (str) – bot token from Telegram bot creation

  • chat_id (str) – Telegram chat ID number that this module will post to

  • send_images (bool) – whether or not to send images. if False, only alerts will be sent.

  • q (queue.Queue) – queue of data and messages sent by rsudp.c_consumer.Consumer

run()

Reads data from the queue and sends a message if it sees an ALARM or IMGPATH message


Back to top ↑