Async-first fork of pyTelegramBotApi
Project description
telebot
Async-first fork of pyTelegramBotApi library wrapping the Telegram Bot API.
Supported Bot API version: 6.0!
See upstream project docs and README
Usage
Install with
pip install telebot-against-war
Basic usage
import asyncio
from telebot import AsyncTeleBot, types
async def minimal_example():
bot = AsyncTeleBot("TOKEN")
@bot.message_handler(commands=["start", "help"])
async def receive_cmd(m: types.Message):
await bot.send_message(m.from_user.id, "Welcome!")
@bot.message_handler() # catch-all handler
def receive_message(m: types.Message):
await bot.reply_to(m, m.text)
await bot.infinity_polling(interval=1)
asyncio.run(minimal_example())
Development
The project uses Poetry to manage dependencies, build and publish the package.
Install as described here and make sure to update
to the latest 1.2.x
version:
poetry self update 1.2.0b1
Installing and configuring locally
poetry install
poetry run pre-commit install
Running tests and linters
poetry shell
pytest tests -vv
mypy telebot
black .
isort .
Building
poetry plugin add poetry-dynamic-versioning
poetry build
poetry publish -u <pypi-username> -p <pypi-pwd>
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
telebot-against-war-0.4.10.tar.gz
(72.2 kB
view hashes)
Built Distribution
Close
Hashes for telebot-against-war-0.4.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 350944124873f9157402926dbed3f49eabcd2f5aa90ba5d2ca6b0edcfca46337 |
|
MD5 | 78d49cc5c1a0f00b2d562f216a2dc27f |
|
BLAKE2b-256 | 563dab5d2de187714b66bde377319b1f6873dee32ce94a0033fa81e94771971d |
Close
Hashes for telebot_against_war-0.4.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfe912b03df3a1ac1f6de3eecb55e21180b8f2b01c3be31262606bd61b47ac73 |
|
MD5 | ea9d6cb09c7dd898a2bb31bc986240d9 |
|
BLAKE2b-256 | 8112a59d3a56db2b8bb9a2829caa25b3a32b89972261c5ea61b9a83626f76092 |