Modern visionary telegram bot framework.
Project description
telegrinder
— effective and reliable telegram bot building.
- Type hinted & type functional
- Customizable and extensible
- Fast models built on msgspec
- API client powered by fast wreq library
- Both low-level and high-level API
- Convenient dependency injection via nodes
-
A variety of state management tools
○ waiter machine for runtime inline short state funneling
○ state mutator to declare complex state sets
Basic example:
from telegrinder import API, Message, Telegrinder, Token
from telegrinder.modules import setup_logger
from telegrinder.rules import Text
setup_logger(level="INFO")
api = API(token=Token("123:token"))
bot = Telegrinder(api)
@bot.on.message(Text("/start"))
async def start(message: Message) -> None:
me = (await api.get_me()).unwrap()
await message.answer(f"Hello, {message.from_user.full_name}! I'm {me.full_name}.")
bot.run_forever()
Getting started
Install using pip, uv or poetry:
uv add telegrinder
poetry add telegrinder
pip install telegrinder
Or install from source (unstable):
uv add "telegrinder @ git+https://github.com/timoniq/telegrinder@dev"
poetry add git+https://github.com/timoniq/telegrinder@dev
pip install git+https://github.com/timoniq/telegrinder@dev
Documentation
Community
Join one of our forums.
License
Telegrinder is MIT licensed
Copyright © 2022 timoniq
Copyright © 2024 luwqz1
Contributors
We welcome your pull requests (contrubution notes). Telegrinder is built by the community
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file telegrinder-1.0.1.tar.gz.
File metadata
- Download URL: telegrinder-1.0.1.tar.gz
- Upload date:
- Size: 526.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05f37fa96318d8446d6daa785395bda6826f44d52ad95a2a010d05fed7c785c8
|
|
| MD5 |
65339b787f2614adbe64bae7d8a5ed3c
|
|
| BLAKE2b-256 |
92f3fe0ada89268523ab17586b2356711af3295ba9e0b019a8476caafd02819b
|
File details
Details for the file telegrinder-1.0.1-py3-none-any.whl.
File metadata
- Download URL: telegrinder-1.0.1-py3-none-any.whl
- Upload date:
- Size: 323.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b629626976df8386984cc6f1553d9fbbf4967038c4b819657b15a35a35c12ad3
|
|
| MD5 |
831081f1304541b0cfc9d4558509126b
|
|
| BLAKE2b-256 |
1739493a341e2a11d84fc1945a9e6f8a8cf20485ace025c296e6ca57a2330e9d
|