Skip to main content

Dead simple helper for posting Telegram bot messages.

Project description

Telegram Post

Telegram Post is a dead simple standalone python library.

It has one purpose: post a message via telegram bot.

Dependencies

requests

Setup

Can use env vars or pass a dictionary at run time. see examples below.

Install from PyPI:

pip install dead-simple-telegram

Examples

There are two ways to use this lib. Import from dead_simple_telegram:

With Environmential Vars

Set these values TELEGRAM_BOT_TOKEN = "your bot api token" TELEGRAM_CHAT_ID = "chat id for the conversation" TELEGRAM_TIMEOUT = 5 # optional defaults to 10

from dead_simple_telegram import TelegramConfig, send_message

config = TelegramConfig.from_env()
message = "This is a message"
send_message(config, message)

With a Dictionary

from dead_simple_telegram import TelegramConfig, send_message

config = TelegramConfig.from_dict({"bot_token": "YOURTOKEN", "chat_id": "YOURCHATID", "timeout":5})
message = "This is a message"
send_message(config, message)

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

dead_simple_telegram-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

dead_simple_telegram-0.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file dead_simple_telegram-0.1.0.tar.gz.

File metadata

  • Download URL: dead_simple_telegram-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dead_simple_telegram-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eb071af5bca7235cfa05789c1b21273d5a7f37b4f953da76a007b62ee0c1d8ec
MD5 6e99f39b6c26c278f488b73e5d7780c0
BLAKE2b-256 09fb40e4d179a6859d544273fa272d8f890b8a923484f62946b5fad2e0253868

See more details on using hashes here.

Provenance

The following attestation bundles were made for dead_simple_telegram-0.1.0.tar.gz:

Publisher: publish.yml on rioncm/simple-telegram

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dead_simple_telegram-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dead_simple_telegram-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 598b46d0fe44b7be3185a00410dcaa2776c5940a38d39dc1aa2107519a39353f
MD5 07cb6cf214784e2c39743efbef515624
BLAKE2b-256 cdf5a46f255342e3360b554738acea2bfcd7ea10831023c1ce869dbcfe5cf3cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for dead_simple_telegram-0.1.0-py3-none-any.whl:

Publisher: publish.yml on rioncm/simple-telegram

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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