Metadata-Version: 2.4
Name: dead-simple-telegram
Version: 0.1.2
Summary: Dead simple helper for posting Telegram bot messages.
Home-page: https://github.com/rioncm/simple-telegram
Author: Rion Morgenstern
License: MIT
Project-URL: Homepage, https://github.com/rioncm/simple-telegram
Project-URL: Repository, https://github.com/rioncm/simple-telegram
Project-URL: Issues, https://github.com/rioncm/simple-telegram/issues
Keywords: telegram,bot,notification
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Chat
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.0
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Dynamic: license-file

# 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:

``` bash
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

``` python
from dead_simple_telegram import TelegramConfig, send_message

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

```

## With a Dictionary
``` python
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)

```
