pyTelegramBotAPI
Python Telegram bot API.
Decision gist · record as of 2026-08-14
Yes, with conditions. The library is actively maintained, has no known vulnerabilities, and is production-stable for building Telegram bots. However, the GPLv2 copyleft license requires that any application using it be open-source or compatible with GPL terms—a significant constraint for proprietary projects. If your use case permits GPL licensing, this is a solid, well-established choice.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a Telegram Bot API token obtained from @BotFather on Telegram; Python 3.10 or later.
- Low install friction with a pure-Python wheel distribution.
- The package is actively maintained with a recent release and has been in development since 2015, indicating stable, long-term support.
License · maintenance · safety
GPL2 (copyleft) — Licensed under GPLv2 (copyleft). Any derivative work or application that bundles this library must also be distributed under GPLv2 or a compatible license, which may restrict commercial or proprietary use.
last release 2026-08-13 (1 days) · last repo commit 2026-08-13 · 8,763 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,212,302 downloads/mo, #4,212 on PyPI
Alternatives
Verify before relying
pip install pyTelegramBotAPI
import pytelegrambotapi
bot = pytelegrambotapi.TeleBot("YOUR_BOT_TOKEN")
@bot.message_handler(commands=['start'])
def send_welcome(message):
bot.reply_to(message, "Hello!")
bot.infinity_polling()- Whether the library fully supports all current Telegram Bot API features or has known limitations beyond those documented.
- Performance characteristics when handling high-volume message throughput or concurrent async operations.
- Whether middleware and custom filter systems are production-ready for complex bot logic.
What it is and what it does
pyTelegramBotAPI is a Python wrapper around the Telegram Bot API that lets you build bots without directly managing HTTP requests. It abstracts away API calls into a simple class-based interface with decorators for message handling, supporting both blocking (synchronous) and non-blocking (asynchronous) patterns. The library handles message routing, reply markup, inline queries, callback buttons, and other Telegram-specific features like polls and payment workflows.
You define handlers—functions decorated with filters that match incoming messages—and the library dispatches incoming updates to the right handler. It manages the polling loop or webhook setup to keep your bot listening for messages. With aiohttp and requests as its only runtime dependencies, it stays lightweight while supporting modern Python versions from 3.10 onward.
Use it for
- Build a command-driven bot that responds to /start, /help, and custom commands with static or dynamic replies.
- Create an interactive bot with inline keyboards and callback queries for user navigation and form submission.
- Set up a notification or alert bot that sends messages to users or channels based on external events or schedules.
- Develop a bot that processes media (photos, documents, audio) and performs actions like storage, analysis, or forwarding.
- Implement a polling-based or webhook-based bot that scales to handle multiple concurrent user conversations.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
The library is actively maintained, has no known vulnerabilities, and is production-stable for building Telegram bots. However, the GPLv2 copyleft license requires that any application using it be open-source or compatible with GPL terms—a significant constraint for proprietary projects. If your use case permits GPL licensing, this is a solid, well-established choice.
Install
pytelegrambotapi on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. The package is actively maintained with a recent release and has been in development since 2015, indicating stable, long-term support.
Requires a Telegram Bot API token obtained from @BotFather on Telegram; Python 3.10 or later.
License in practice
Licensed under GPLv2 (copyleft). Any derivative work or application that bundles this library must also be distributed under GPLv2 or a compatible license, which may restrict commercial or proprietary use.
Quickstart
pip install pyTelegramBotAPI
import pytelegrambotapi
bot = pytelegrambotapi.TeleBot("YOUR_BOT_TOKEN")
@bot.message_handler(commands=['start'])
def send_welcome(message):
bot.reply_to(message, "Hello!")
bot.infinity_polling()
Verify before relying
- Whether the library fully supports all current Telegram Bot API features or has known limitations beyond those documented.
- Performance characteristics when handling high-volume message throughput or concurrent async operations.
- Whether middleware and custom filter systems are production-ready for complex bot logic.
Package facts
| License | GPL2 copyleft |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesaiohttprequests |
| Maintenance | Actively maintained 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,212,302 / month, #4,212 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleLicense :: OSI Approved :: GNU General Public License v2 (GPLv2)Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: pytelegrambotapi-4.36.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “build telegram bots”
- pyTelegramBotAPIA Python library that wraps the Telegram Bot API, providing both…
- aiogramaiogram is an asynchronous Python framework for building Telegram…
- pyroforkPyrofork is an asynchronous Python framework for interacting with…
Give your agent the search over MCP, or paste the wish link into any chat.
More Internet packages
Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.
Install it if you need programmatic access to AWS services.
Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.
Install it if you need to call AWS services from async Python code; it is the standard way to do so.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.
See also aiogram · python-telegram-bot · telebot · twitchAPI · Telethon · Pyrogram · pyrofork · Kurigram · rlbot · nonebot2