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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dead_simple_telegram-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 1ab8e6554987c00c9572d13b51a7301e4e7f23e6cac272196ee6b5911677437b
MD5 0be18df9b4a5d0ffab7cf10f5e9fa5db
BLAKE2b-256 90242496c965f67329847468f8dab767ff4110e22075e2c5b1df246f5e761031

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dead_simple_telegram-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9b0bb7bf1d47e623d7520b610cf1376beedd1c628870add3966044070b762d04
MD5 dce88d9537a34d88ac4c5f104ba6075b
BLAKE2b-256 89d2031df531b8da27ae62d75c2ed73d770dc96682b5ba83951bb0e858abdc8d

See more details on using hashes here.

Provenance

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