Skip to main content

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

Get your Telegram chat 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.

Source Distributions

No source distribution files available for this release. See tutorial on generating distribution archives.

Built Distribution

NoTel-0.1a1-py3-none-any.whl (4.2 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page