Skip to main content

Single-shot CLI for sending text plus an optional image or video to Telegram.

Project description

tg-push

Python CLI for sending text plus an optional image or video to Telegram.

There is no bot polling loop, no MCP bridge, and no long-running server, just simple one-way messages.

Install

pip install tg-push

Or with pipx for an isolated install:

pipx install tg-push

Environment

Variable Required Description
TG_BOT_TOKEN yes Telegram bot token from @BotFather
TG_CHAT_ID yes Target chat ID or @channelusername

For a 1:1 bot chat, TG_CHAT_ID is your Telegram user id. For groups and channels, use the actual chat id instead.

Usage

tg-push --text "build finished"
tg-push --file ./render.png
tg-push --text "latest render" --file ./render.png

Behavior

  • At least one of --text or --file is required.
  • If --file is present, the tool auto-detects image vs video from the file extension.
  • Supported image extensions: .jpg, .jpeg, .png, .webp
  • Supported video extensions: .mp4, .mov, .m4v, .webm, .mkv, .avi
  • If --text is longer than Telegram's media caption limit, the file is sent first and the text is sent as follow-up messages.
  • The project has no runtime dependencies outside the Python standard library.

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

tg_push-2.0.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tg_push-2.0.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file tg_push-2.0.1.tar.gz.

File metadata

  • Download URL: tg_push-2.0.1.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for tg_push-2.0.1.tar.gz
Algorithm Hash digest
SHA256 7ef1a0c2bf5da8759b1e9a07ab3af63501621f057a908461a50d935cd6a2505e
MD5 af81c446f038cea188985e2231070217
BLAKE2b-256 7b579fc2841a72d8b3ecdb663550769fa8b730ccf3fe3e69a16ba1cb8369beb6

See more details on using hashes here.

File details

Details for the file tg_push-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: tg_push-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for tg_push-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eb13689d2839e63f6f21c3dd4f58ed3aa47a5532dda6b25fa06a835c2b07e70f
MD5 d8d0324169ca09596e93c142b72d570c
BLAKE2b-256 b8de882ce6664c9ac4a91c790d3baa2f6494d964caa390107b8057f155d829b5

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