https://github.com/timoniq/telegrinder
Modern visionary telegram bot framework
https://github.com/timoniq/telegrinder
async bot chatbot framework telegram
Last synced: 12 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 (almost 4 years ago)
- Default Branch: dev
- Last Pushed: 2025-04-11T00:41:28.000Z (12 months ago)
- Last Synced: 2025-04-11T01:26:30.385Z (12 months ago)
- Topics: async, bot, chatbot, framework, telegram
- Language: Python
- Homepage:
- Size: 2.5 MB
- Stars: 42
- Watchers: 3
- Forks: 5
- Open Issues: 8
-
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
* Customizable and extensible
* Ready to use scenarios and rules
* Flexible DI [nodes](https://github.com/timoniq/telegrinder/tree/main/telegrinder/node)
* Fast models built on [msgspec](https://github.com/jcrist/msgspec)
* Both low-level and high-level API
* Support for different [dependency builds](https://github.com/timoniq/telegrinder/blob/dev/docs/guide/optional_dependencies.md)
Basic example:
```python
from telegrinder import API, Message, Telegrinder, Token
from telegrinder.modules import logger
from telegrinder.rules import Text
logger.set_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.git#dev
pip install git+https://github.com/timoniq/telegrinder/archive/dev.zip
```
# Documentation
[Readthedocs](https://telegrinder.readthedocs.io)
# Community
Join our [telegram forum](https://t.me/botoforum).
# License
Telegrinder is [MIT licensed](./LICENSE)\
Copyright © 2022-2025 [timoniq](https://github.com/timoniq)\
Copyright © 2024-2025 [luwqz1](https://github.com/luwqz1)
# Contributors
[How to contribute](https://github.com/timoniq/telegrinder/blob/main/contributing.md)