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.2.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.2-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dead_simple_telegram-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 24558211f4aa232820c7b0655fceba57c5bdcedb3f640098b0ab78acbaa832a1
MD5 405476eff5729f92dc0f24edcec22a49
BLAKE2b-256 036fa15eb1b8d83b4a2681bc483e44a5f9597998410680eec4ef9801ddd47084

See more details on using hashes here.

Provenance

The following attestation bundles were made for dead_simple_telegram-0.1.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for dead_simple_telegram-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1d9d66f471c057c5ab7c8ddcbf65c8eede41ee928dabb5091d464962a83a1b1f
MD5 31e2823c3dbc682aef1027255456aa2f
BLAKE2b-256 a14a251818b5fdd3cc85b92f2763f0eb78829df6498c8a5bd4de34f737079fde

See more details on using hashes here.

Provenance

The following attestation bundles were made for dead_simple_telegram-0.1.2-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