Skip to main content

sendtelegram

Current version: 0.2.0

A Telegram replacement for sendmail.

sendtelegram uses a Telegram bot to send messages to a specific user. It reads from stdin, splits the input text into messages of at most MAX_MSG_LEN characters (default: 4096) and send them using the Telegram API.

sendtelegram adheres to the 12 factor principles to manage settings.

It requires two environment variables:

  • SENDTELEGRAM_API_TOKEN: the Telegram API token.
  • SENDTELEGRAM_CHAT_ID: id of the chat between the bot and the target user.

Usage

usage: sendtelegram [-h] [-m MAX_MSG_LEN]

optional arguments:
  -h, --help            show this help message and exit
  -m MAX_MSG_LEN, --max-msg-len MAX_MSG_LEN
                        Max number of characters of a Telegram message (default: 4096)

Examples

Sending a text file as a telegram message:

cat README.md | sendtelegram

Author

Metadata

Release files for sendtelegram 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sendtelegram 0.2.0
File Size Uploaded
sendtelegram-0.2.0.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sendtelegram 0.2.0
File Interpreter ABI Platform
sendtelegram-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / sendtelegram-0.2.0.tar.gz

Download URL sendtelegram-0.2.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ef128a3bb0d8c996805c8c7e6dcc2148380f8b087598ec8b36b8d27d831f1ee9
BLAKE2b-256 checksum
How to use checksums
4b995c4ff8b4dad98b0f2eec7b42f573e323dafcc6da56022868fc18a283103b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

Release files / sendtelegram-0.2.0-py3-none-any.whl

Download URL sendtelegram-0.2.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e489ba5ac83952b3f96c4a80a24e00235a07d54253fb1991df04398f57478330
BLAKE2b-256 checksum
How to use checksums
79ad687bb872e17565261c41f36fe2b130d217a73fe6b4ffb2bbda27b01f24b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page