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.2.tar.gz
(90.2 kB
view hashes)
Built Distribution
Close
Hashes for telebot_against_war-0.6.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ed6a76e4e92af2cf7616c63426fc751c8e14ff10f07e1013cdc5158a431fd47 |
|
MD5 | 86ca1ba49351714608ff617c5db2de2e |
|
BLAKE2b-256 | 878fde57b5c0b43c67421e434b2bcc0a372977c62548e3f8334ceccdcdc9c8e8 |
Close
Hashes for telebot_against_war-0.6.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03c0f2b28cfaffc5f3a1263ef9380a833c63ae5acc361c6ad4db535c781c5612 |
|
MD5 | e7bf57f9653e3a0504def4555993598f |
|
BLAKE2b-256 | b88903dad06bf2f8316402cd412f27b64b9dcb827952f0aae6a6ce21c0c2faa6 |