Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

easy telegram notification sender for both python and CLI

Project description

NoTel: Easy Telegram Notification sender for Python and CLI

NoTel is a simple Telegram notification sender written in Python 3. If you have your own bot token, you can just start using NoTel.

Installing NoTel

NoTel is hosted on PyPI. To install, run the following command in your Python environment:

$ pip install notel
$ notel --default_token [YOUR_TOKEN] --default_chat_id [YOUR_CHAT_ID]

If you don't know how to get your own bot token and your chat ID, please follow below links.

Also, please note that you should start a talk with your bot before sending messages through NoTel.

Make your own bot and get token

https://tutorials.botsfloor.com/creating-a-bot-using-the-telegram-bot-api-5d3caed3266d

Get your Telegram chat ID

https://bigone.zendesk.com/hc/en-us/articles/360008014894-How-to-get-the-Telegram-user-ID-

Using NoTel

Using NoTel in Command Line Interface

After you set default token and default chat ID, you can simply send Telegram notification with the command below.

$ notel -m Hello

Available arguments

  • -h, --help show this help message and exit
  • --set_default_id SET_DEFAULT_ID, -di SET_DEFAULT_ID set a default Telegram chat id for notel
  • --set_default_token SET_DEFAULT_TOKEN, -dt SET_DEFAULT_TOKEN set a default Telegram token for notel
  • --chat_id CHAT_ID, -i CHAT_ID set a Telegram chat id to send a message
  • --token TOKEN, -t TOKEN set a Telegram bot token to send a message
  • --message MESSAGE, -m MESSAGE a message to send to chat id
  • --print_console PRINT_CONSOLE, -p PRINT_CONSOLE set notel to print to stdout

Using NoTel inside Python

NoTel can be imported as a module to be used directly in Python also.

from notel import tprint

tprint("Hello, world!")

Available arguments

  • tprint(msg, token=None, chat_id=None, print_console=True)
    • msg: The message you want to send.
    • token: token of Telegram bot. If token is None, then the default_token will work.
    • chat_id: Chat ID for the user who want to receive the message. If chat_id is None, then the default_chat_id will work.
    • print_console: If print_console is False, tprint will not print msg in your console.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
NoTel-0.1a1-py3-none-any.whl (4.2 kB) Copy SHA256 hash SHA256 Wheel py3

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page