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
Metadata
Release files for telegrinder 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| telegrinder-1.1.3.tar.gz | 551.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| telegrinder-1.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 885.8 kB
Release files / telegrinder-1.1.3.tar.gz
| Download URL | telegrinder-1.1.3.tar.gz |
|---|---|
| Size | 551.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd4cd9f952e8afd7912ff7d6c09651b2a73e1d2ca6d6c3a8e87df6ac7b8790bf
|
|
BLAKE2b-256 checksum How to use checksums |
c46557a877c6b0a8920fb2b40caeca7087f77f8fc007e28f5d11e6aa520b0318
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|
Release files / telegrinder-1.1.3-py3-none-any.whl
| Download URL | telegrinder-1.1.3-py3-none-any.whl |
|---|---|
| Size | 334.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fcda18c78ca6f0d91ba58f8b66ab4686627fcb18456d408a71489c0f95c82862
|
|
BLAKE2b-256 checksum How to use checksums |
39be0cb0a8c2ccf92033e1a8a3a75c118d1b1e9e753bbd956beabd85950171dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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}
|