skillfed

Pyrogram

Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots

pyrogram v2.0.106 503.5K downloads/30d#6,304 on PyPI4,620
Copyleft license LGPLv3 Abandoned released

What it is and what it does

Pyrogram is an asynchronous Python framework that wraps Telegram's MTProto API, allowing you to build custom Telegram clients and bots without using Telegram's official Bot API. It abstracts the low-level protocol details while exposing the full range of Telegram's functionality—sending and receiving messages, handling events, managing chats, and executing actions that a regular Telegram client can perform. The library is designed to be intuitive and type-hinted, supporting both async and synchronous usage patterns.

The framework depends on pyaes for encryption and pysocks for proxy support, and it targets Python 3.7 and later across CPython and PyPy. While the project is marked as Production/Stable, it is now archived and abandoned—the repository accepts no new contributions, and the last release was in April 2023. This means security updates, bug fixes, and compatibility patches with future Telegram protocol changes are unlikely to be provided by the original maintainers.

Use it for:

  • Build a custom Telegram client that automates message sending, forwarding, or archiving from a user account.
  • Create a bot that responds to messages in private chats or groups with custom logic beyond what the official Bot API allows.
  • Scrape or monitor Telegram channels and groups by acting as an authenticated user client.
  • Implement Telegram-based workflows that require full API access, such as bulk messaging or account management tools.
  • Develop a Telegram notification service that sends alerts or updates to specific chats programmatically.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Pyrogram is an asynchronous Python framework for interacting with Telegram's MTProto API, enabling you to build custom clients and bots that send messages, handle events, and execute Telegram actions programmatically.

Yes, but with caution. Pyrogram is stable and widely used for Telegram automation, with low install friction and no known security vulnerabilities. However, the project is abandoned—no maintenance since April 2023—so you should only adopt it if you can tolerate the risk that Telegram protocol changes or security issues in dependencies will not be addressed by the original maintainers. If you need active support or plan to rely on this for production systems, investigate maintained forks or alternatives first.

Install

pyrogram on PyPI

pip

pip install pyrogram

uv

uv add pyrogram

poetry

poetry add pyrogram

Installing Pyrogram

Before you install

Installation is straightforward with low friction—a pure Python wheel with only two runtime dependencies (pyaes and pysocks). However, the project is archived and abandoned as of late 2024, with no active maintenance; the last release was in April 2023.

License in practice

Pyrogram is licensed under LGPLv3 (copyleft), which requires that any modifications you make to the library itself be shared under the same license, though applications using it as a dependency are not subject to this requirement.

Quickstart

pip install pyrogram

from pyrogram import Client, filters

app = Client("my_account")

@app.on_message(filters.private)
async def hello(client, message):
    await message.reply("Hello from Pyrogram!")

app.run()

Requires Python 3.7 or later; you must have valid Telegram credentials (phone number or bot token) and network access to Telegram's servers to authenticate and use the client.

Verify before relying

  • Whether the archived repository will accept security patches or bug fixes if vulnerabilities are discovered in dependencies like pyaes or pysocks.
  • Current compatibility with Telegram's MTProto protocol—whether recent Telegram client updates have broken the library's functionality.
  • Whether community forks or maintained alternatives exist that build on Pyrogram's codebase.

Package facts

License LGPLv3 (copyleft)
Python support supports the current Python release (~=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 2 — pyaes, pysocks
Maintenance abandoned — 1,202 days since the last release
Last repo commit (repository archived)
First released
Downloads 503,487/month — #6,304 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: Pyrogram-2.0.106-py3-none-any.whl

Keywords: telegram, chat, messenger, mtproto, api, client, library, python

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)Natural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: ImplementationProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: CommunicationsTopic :: Communications :: ChatTopic :: InternetTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python Modules

Tags

telegram api client pythontelegram bot frameworkmtproto api pythontelegram messaging libraryasync telegram clienttelegram automation pythontelegram user account api
telegram-apiasync-frameworkabandoned

More Libraries packages