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
Manually merged changes up to version 4.10.0
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 .
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.6.5.tar.gz
(91.5 kB
view hashes)
Built Distribution
Close
Hashes for telebot_against_war-0.6.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96b94bd1fe2af41a345bc7f301749977e78e8b22e7a00af1822449f79e8ee74f |
|
MD5 | 31bc73dc55f545d28f910eefe564d8ff |
|
BLAKE2b-256 | 51ef6e0a842d8f956f123ca987bb9d842fcea5f8a9d1ca2651b6c44183fbcc73 |
Close
Hashes for telebot_against_war-0.6.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 720ec23831a5198b338e35e85e5f0b1f30fbaacd249940b9e977b7cc8e043fa4 |
|
MD5 | a7850c99811df018af7811c7d59c4635 |
|
BLAKE2b-256 | ff19084189274a7313132defbd4a24acae1738a45285ee7215640de6abdc3232 |