Skip to main content

Async-first fork of pyTelegramBotApi

Project description

PyPI package version Supported Python versions

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


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.7.5.tar.gz (94.1 kB view details)

Uploaded Source

Built Distribution

telebot_against_war-0.7.5-py3-none-any.whl (100.5 kB view details)

Uploaded Python 3

File details

Details for the file telebot_against_war-0.7.5.tar.gz.

File metadata

  • Download URL: telebot_against_war-0.7.5.tar.gz
  • Upload date:
  • Size: 94.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for telebot_against_war-0.7.5.tar.gz
Algorithm Hash digest
SHA256 b15a226fcb51970f2cfe57d006b604bf1d20bc8d8c6cd1cb8b764872006ba4e3
MD5 864aef164b7ac6ed53d4d06f10581310
BLAKE2b-256 dbd3655ccfe1782a6a673eda9bd047b6bbb93fc9687eab7dfe4cdbf4574cef51

See more details on using hashes here.

File details

Details for the file telebot_against_war-0.7.5-py3-none-any.whl.

File metadata

File hashes

Hashes for telebot_against_war-0.7.5-py3-none-any.whl
Algorithm Hash digest
SHA256 999325ea85e49ce1b4959cbb8251df3a5eef7ffab2686f8b13c746fb9623dcca
MD5 9712e0fbd86a50a4c19a6469de87011b
BLAKE2b-256 2b34e11dbef63fe3242c5672c736a5b4acb628853513dcfbcb23f5366c7d9d6c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page