https://github.com/timoniq/telegrinder
Modern visionary telegram bot framework
https://github.com/timoniq/telegrinder
async bot chatbot framework telegram
Last synced: about 2 months ago
JSON representation
Modern visionary telegram bot framework
- Host: GitHub
- URL: https://github.com/timoniq/telegrinder
- Owner: timoniq
- License: mit
- Created: 2022-04-17T06:01:40.000Z (about 4 years ago)
- Default Branch: dev
- Last Pushed: 2026-04-23T11:39:38.000Z (about 2 months ago)
- Last Synced: 2026-04-23T13:29:20.653Z (about 2 months ago)
- Topics: async, bot, chatbot, framework, telegram
- Language: Python
- Homepage: https://github.com/timoniq/telegrinder/blob/dev/docs/tutorial/en/0_tutorial.md
- Size: 4.78 MB
- Stars: 64
- Watchers: 4
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
- Contributing: contributing.md
- License: LICENSE
Awesome Lists containing this project
README
telegrinder
— effective and reliable telegram bot building.
* Type hinted & [type functional](https://github.com/timoniq/telegrinder/blob/dev/docs/tutorial/en/3_functional_bits.md)
* Customizable and extensible
* Fast models built on [msgspec](https://github.com/jcrist/msgspec)
* API client powered by fast [wreq](https://github.com/0x676e67/wreq-python) library
* Both low-level and high-level API
* Convenient [dependency injection](https://github.com/timoniq/telegrinder/blob/dev/docs/tutorial/en/5_nodes.md) 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:
```python
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:
```console
uv add telegrinder
poetry add telegrinder
pip install telegrinder
```
Or install from source (unstable):
```console
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
[**Tutorial 📖**](/docs/tutorial/en/0_tutorial.md)
# Community
Join one of our [forums](https://github.com/timoniq/telegrinder/blob/dev/docs/community_links.md).
# License
Telegrinder is [MIT licensed](./LICENSE)\
Copyright © 2022 [timoniq](https://github.com/timoniq)\
Copyright © 2024 [luwqz1](https://github.com/luwqz1)
# Contributors
We welcome your pull requests ([contrubution notes](https://github.com/timoniq/telegrinder/blob/main/contributing.md)). Telegrinder is built by the community