Skip to main content

tgcli is a client tool for Telegram.

Project description

tgcli

PyPI PyPI PyPI PyPI Telegram Code Style

tgcli is a Python cli app for Telegram.

Build Coverage
Master Travis (.com) master
Development Travis (.com) development

Installing

Install via pip:

pip install tgcli

Rationale

A similar project, built on Python, was created by @vysheng, but it has not been updated since 2016 and considered abandoned. This tool is not a fork of the mentioned project, it is built from ground up.

Example

For now, the use case is pretty simple. To send a message:

tgcli bot --token "BotToken" send --receiver "UserID" message "Your message"

You don't need to expose your token as flag. If you set TELEGRAM_BOT_TOKEN environment variable, you do not need to set --token flag. Just set it before using tgcli:

export TELEGRAM_BOT_TOKEN="BotToken"

You can get more information by doing:

tgcli bot send --help

Also, this repository uses notification from a private bot, you can see the example Travis configuration here. Private TELEGRAM_BOT_TOKEN and TELEGRAM_RECEIVER environment variables were set.

This application serves a really small purpose for now. It might face breaking changes in the future.

Documentation

Documentation has an intensive amount of information about how to use tgcli. Refer to the documentation.

Project details


Download files

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

Source Distribution

tgcli-0.2.1.tar.gz (5.4 kB view details)

Uploaded Source

File details

Details for the file tgcli-0.2.1.tar.gz.

File metadata

  • Download URL: tgcli-0.2.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for tgcli-0.2.1.tar.gz
Algorithm Hash digest
SHA256 bfe365d9eac4377d9d6c9c75077efc3c128f98f2e1ee9e4786ab0d65ba6cde67
MD5 831105e4a4c99356c24dcb0ed464c55a
BLAKE2b-256 eddb3faa9e9fee244de3e4c0aec4f5954a44eb8a1070e836377af76ec1a59cd2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page