Add telegram() function to send Telegram notifications, hosting on my VPS [done]

This is added in v1.42, available with pip install rpa --upgrade

  1. look up @rpapybot and tap START to allow receiving messages
  2. use r.telegram(id, message) to send a Telegram message
  3. return True if message sent successfully and False otherwise
import rpa as r
r.telegram(id, message)

Developer Notes

# use the default VPS server that I host, or your own Telegram server that you host
r.telegram(1234567890, 'Sent using my VPS server endpoint https://tebel.org/rpapybot')
r.telegram(1234567890, 'Sent using your own hosted endpoint', 'https://your_endpoint')

RPA_for_Python


In addition, RPA for Python is a light and simple 1-file package with following functions written in pure Python 2/3 without Python dependencies or TagUI. They are great time-savers instead of Python users having to write their own.

load() - load text file
dump() - save text file
write() - append text file
ask() - ask for user input
wait() - wait for some time
check() - output conditionally
download() - file from URL
unzip() - unzip a zip file
run() - OS level commands
get_text() - between 2 markers
del_chars() - delete characters

.. more info at RPA for Python GitHub repo