awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
pyrogram avatar

pyrogram/pyrogramArchived

0
View on GitHub↗
4,614 stars·1,390 forks·Python·LGPL-3.0·15 viewspyrogram.org↗

Pyrogram

Pyrogram is an asynchronous Python framework for interacting with the Telegram MTProto API. It serves as both a bot framework and a user client library, providing a concrete implementation of the MTProto protocol for secure communication with Telegram servers.

The library distinguishes itself by providing a high-level wrapper layer that abstracts complex protocol methods into Python functions, while still allowing for the execution of raw API functions and low-level peer resolution. It supports multi-client concurrency, enabling the management of several user or bot identities within a single process.

Its capability surface covers comprehensive account and session management, including two-step authentication and registration. It provides extensive tools for chat management across groups and channels, automated bot logic for inline queries and commands, and a wide range of messaging functions for handling text, polls, and large media files through chunk-based streaming.

The framework also includes utilities for contact management, global and local search indexing, and event-driven automation via filter-based dispatching.

Features

  • MTProto Implementations - Implements the custom binary protocol used for secure communication between clients and the messaging servers.
  • Chat History APIs - Provides an API-level interface for managing and querying conversational message logs and history.
  • Supergroup Configuration - Supports the creation and structural configuration of supergroups with titles and descriptions.
  • Profile Information Retrieval - Retrieves profile details for users using their unique ID, username, or phone number.
  • SDK Client Initialization - Implements the initialization of the client and its internal workers to handle protocol updates and message dispatching.
  • Graceful Shutdowns - Provides a graceful shutdown mechanism to terminate the dispatcher and workers, ensuring a clean session exit.
  • API Request Execution - Executes client actions and requests using a user account or bot identity.
  • Bot Logic Frameworks - Provides a framework for implementing bot logic, including handling inline queries and callback answers.
  • Broadcast Messaging Channels - Enables the creation of broadcast channels for one-to-many communication and message distribution.
  • Chat Configuration Management - Updates chat titles, descriptions, profile photos, and member permissions.
  • Chat Message Sending - Provides capabilities for sending animation files and silent videos to users and chats.
  • Authorization Flows - Handles the complex authorization process via interactive prompts during the initial client session setup.
  • Client Connection Lifecycle - Terminates the active connection and stops background tasks to shut down the session.
  • Client Connectivity Management - Manages the full lifecycle of client connectivity, from establishing the connection to shutting down the session.
  • Messaging Client Connections - Provides the mechanisms to establish secure connections between the client and Telegram messaging servers.
  • Event-Driven Update Handlers - Provides a system for registering and removing handlers to react to incoming service updates.
  • Group Chat Administration - Provides tools for programmatically creating group chats and managing their membership.
  • Invite Link and Join Request Managements - Implements the workflow for administrators to approve or reject pending join requests for private chats.
  • Low-Level API Interfaces - Allows executing low-level API methods directly when high-level wrapper functions are unavailable.
  • Telegram Clients - Provides a full-featured client implementation of the Telegram protocol for automating user account workflows.
  • Audio Message Constructions - Constructs and sends audio messages including support for metadata and captions.
  • Messaging App Integrations - Provides interfaces to connect external systems to Telegram for notifications, media uploads, and chat synchronization.
  • Client Session Management - Handles connectivity using session files, memory strings, or tokens to maintain user connection state.
  • Raw API Access - Telethon calls raw functions and resolves peer identifiers for advanced custom integrations.
  • Session State Management - Implements session-based state management to maintain synchronization between clients and servers over persistent connections.
  • Telegram API Integrations - Offers comprehensive tools for programmatically interacting with the Telegram platform for both bots and user accounts.
  • Telegram Bot Frameworks - Serves as a comprehensive framework for building interactive bots that handle commands and inline queries on Telegram.
  • Asynchronous Python Frameworks - Built as a non-blocking framework designed for high-concurrency network operations using Python async syntax.
  • Asynchronous Event Loops - Uses an async runtime to handle concurrent network requests and event-driven update processing without blocking.
  • Peer Resolvers by Identifier - Converts a user ID, username, or phone number into a peer object for API requests.
  • Chat Group Member Management - Provides capabilities to add users to groups, supergroups, or channels using IDs, usernames, or phone numbers.
  • Bot Authentication Strategies - Supports authenticating bot accounts using administrator tokens to enable automated interactions.
  • Security and Access Control - Implements two-step verification cloud passwords to harden account security and access control.
  • Session Authentication - Manages secure access and credential persistence to establish and maintain user sessions.
  • Password Changes - Allows users to update their cloud verification passwords and associated recovery hints.
  • User Profile Retrieval - Fetches the profile information of the authenticated user or bot to verify account details.
  • API Abstraction Layers - Provides a high-level Python wrapper that abstracts the complexity of the raw MTProto protocol.
  • Event Filtering - Routes incoming server updates to specific handler functions by matching event metadata against predefined criteria.
  • Chat Message Retrieval - Provides API-driven retrieval of specific messages and message lists from a chat.
  • Network Session Termination - Provides the ability to cleanly close the active connection between the application and remote servers.
  • Event-Driven Update Handlers - Implements layers for routing network messages to callbacks based on event patterns and priorities.
  • Contact List Retrieval - Fetches the complete list of users stored in the address book for both user and bot accounts.
  • Global Messaging Search - Returns the total count of messages matching a query across all chats globally.
  • Chat Group Type Managers - Provides a comprehensive interface to create, delete, join, or leave various Telegram chat types.
  • Media Downloads - Implements programmatic media downloads and chunk-based streaming from Telegram servers.
  • Channel Lifecycle Management - Enables the permanent removal of a specific communication channel using its unique identifier.
  • Message Deletion Capabilities - Enables removing one or more messages from a chat for all participants or only the current user.
  • Chat Member Administration - Implements administrative controls for adding, removing, banning, and promoting members within groups and channels.
  • Member Detail Retrieval - Provides capabilities to retrieve a list of participants from groups or channels, filtered by role or name.
  • Member Permission Modifiers - Provides tools for modifying a user's specific action permissions and access levels within a supergroup.
  • Large File Transfers - Supports the upload and download of large files up to 2 GB in size.
  • Message Search - Searches for specific text or media across a single chat or globally using indexing and retrieval utilities.
  • Contact and Message Searches - Locates specific text and media messages within a chat using keywords and user filters.
  • Local Message Search - Returns the total number of messages within a specific chat that match a search query.
  • Phone Number Authentications - Authenticates user accounts using a combination of phone number and verification codes.
  • Account Update Monitoring - Enables real-time notifications for specific account changes such as user name updates.
  • Voice Message Uploads - Enables uploading and sending audio files as voice messages with optional content protection.
  • Media Grouping - Implements API-level grouping to fetch all messages belonging to a specific media album.
  • Memory-Efficient Media Streaming - Retrieves large media files in incremental chunks to ensure memory-efficient processing.
  • Account Profile Management - Telethon sets or removes the unique identifier for a user account.
  • Account Session Managers - Maintains multiple active connections simultaneously for the same account to manage session state.
  • Bot Command Interfaces - Allows the definition and registration of interactive bot commands with support for scopes and localization.
  • Inline Result Deliveries - Delivers a selected inline result to a specific chat after a user performs a query.
  • Chat Exiting - Allows users to exit groups or channels with an option to delete the conversation history.
  • Chat Joining - Enables users or bots to join groups and channels via identifiers or invite links.
  • Messaging Automation - Triggers asynchronous functions for automated message responses based on predefined filters.
  • Bans - Provides the capability to remove users from a group and prevent their return via invite links.
  • Community Management - Provides programmatic tools to moderate groups and channels, manage member permissions, and control chat settings.
  • Contact Management - Provides utilities to add users to a contact list via identifiers, usernames, or phone numbers.
  • Bulk Contact Imports - Supports adding multiple phone numbers and names to the user address book in bulk.
  • Roster Contact Removals - Allows the removal of specified users from the contact roster using identifiers or usernames.
  • Dialog List Retrievers - Fetches a sequential list of a user's active conversations and chat history.
  • Discussion Threading - Implements discussion threading by locating the first message of a channel post's discussion.
  • Inline Bot Result Retrievals - Implements the retrieval of suggested inline results from a bot based on a text query and location.
  • Inline Query Interfaces - Handles the request-response cycle for returning interactive selection results to users performing inline searches.
  • Poll Creators - Provides components for constructing and sending interactive poll messages with questions and options.
  • Join Request Processing - Allows administrators to reject individual user requests to join a private group or channel.
  • Media Downloads - Telethon saves media from a message to a local directory or memory buffer.
  • Message Content Modification - Provides the ability to update text, captions, media, or reply markups of previously sent messages.
  • Message Detail Retrievers - Provides capabilities to fetch detailed information about specific messages using their unique identifiers.
  • Message Pinning - Implements mechanisms for anchoring important messages to the top of a chat interface.
  • Message Rate Limiting - Sets a minimum time interval between messages to control the pace of conversation.
  • Message Reactions - Provides a system for attaching and removing emoji reactions as non-textual sentiment indicators on messages.
  • Telegram Message Sending - Provides the ability to send media already stored on servers by referencing their unique file identifiers.
  • Multi-Client Concurrency - Provides the ability to manage multiple user or bot identities simultaneously within a single process.
  • Peer Identity Resolution - Implements the conversion of usernames or phone numbers into internal protocol entity IDs.
  • Client Configuration Settings - Customizes client operation by setting device metadata, language codes, and concurrency limits.
  • Chunked Binary Downloads - Transfers large files by breaking them into small binary fragments to optimize memory usage.
  • Telegram File Transfers - Provides the ability to terminate active file uploads or downloads via progress callbacks.
  • Remote File Uploads - Implements the uploading of local files or binary objects to remote servers to obtain a file reference.
  • Sticker Messages - Supports sending static or animated stickers via local files or server identifiers.
  • Message Content Editors - Telethon allows updating the content of an inline message, including text, formatting, and attached keyboards.
  • Chat Group Metadata - Fetches detailed configuration, verification status, and metadata for chat groups and channels.
  • Administrative Privilege Management - Provides capabilities to promote or demote users by assigning and managing elevated administrative roles within chats.
  • Two-Step Login Flows - Implements authentication flows that require a security password beyond the initial login step.
  • MFA Deactivators - Provides the ability to remove the account cloud password and disable two-step verification.
  • Chat Action Permissions - Defines and enforces which specific actions members can perform within a group or supergroup.
  • User Profile Management - Provides comprehensive tools for updating user identity details, usernames, and profile attributes.
  • Profile Media Management - Supports uploading images and short videos to be set as account profile pictures.
  • User Session Termination - Provides the capability to programmatically end a user's authenticated session and clear local storage.
  • User Account Registrations - Provides processes for creating new user accounts by submitting credentials to the platform.
  • Phone Verification Code Flows - Implements authentication flows that use phone verification codes to establish secure sessions.
  • User Block Lists - Prevents specific users from contacting or interacting with an account via a block list.
  • Multi-Instance Client Management - Enables the simultaneous execution of multiple isolated account or bot sessions within a single process.
  • Profile Photo Retrieval - Fetches a sequence of profile pictures for a specific user or chat.
  • Chat Administrative Logs - Fetches a 48-hour log of actions taken by members and administrators in supergroups or channels.
  • Inline Keyboard - Supports interactive inline keyboards that trigger callbacks or open URLs within messages.
  • Message Duplication Utilities - Provides logic for copying messages between chats without linking to the original source.
  • Message Forwarding Utilities - Provides utilities for relaying existing messages between chats while preserving source references.
  • Message Moderation & Interaction - Includes tools for managing existing chat messages, including the ability to clear pinned messages.
  • Event Handler Removals - Implements mechanisms for deregistering event handlers to stop responding to specific server updates.
  • Bot Frameworks - MTProto API framework for users and bots.

Star history

Star history chart for pyrogram/pyrogramStar history chart for pyrogram/pyrogram

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Pyrogram

Similar open-source projects, ranked by how many features they share with Pyrogram.
  • danog/madelineprotodanog avatar

    danog/MadelineProto

    3,344View on GitHub↗

    MadelineProto is an asynchronous PHP library that provides a programmatic interface for interacting with the Telegram API using the MTProto protocol, the same protocol used by official Telegram clients. It functions as both a Telegram bot SDK and a userbot automation library, enabling PHP applications to connect to Telegram as either a bot account or a regular user account, sending and receiving messages, media, and other data directly without relying on the Bot API intermediary. The library is built on an event-driven architecture with Amp v3 fiber-based concurrency, allowing for non-blockin

    PHPamphpasyncbot
    View on GitHub↗3,344
  • tdlib/tdtdlib avatar

    tdlib/td

    8,506View on GitHub↗

    This project is a cross-platform messaging SDK and client development library used to build custom Telegram applications. It functions as a comprehensive framework that manages network encryption, local data storage, and API communication, providing a C-compatible JSON interface that allows integration with any programming language. The library distinguishes itself by providing a full database manager for encrypted local caching and synchronized state, alongside a dedicated bot framework for creating interactive bots with business account integration. It enables the implementation of speciali

    C++cross-platformlibrarytelegram
    View on GitHub↗8,506
  • vysheng/tgvysheng avatar

    vysheng/tg

    7,084View on GitHub↗

    This project is a Telegram command line interface and MTProto client. It functions as a userbot framework, providing a terminal-based environment to interact with Telegram accounts without a graphical user interface. The system differentiates itself through extensibility, offering Python bindings and a Lua scripting engine to automate account tasks and respond to messages. It also serves as a JSON-based chat exporter, capable of extracting user metadata and conversation histories into structured files. The client covers core messaging capabilities, including text exchange, group chat managem

    C
    View on GitHub↗7,084
  • go-telegram-bot-api/telegram-bot-apigo-telegram-bot-api avatar

    go-telegram-bot-api/telegram-bot-api

    6,379View on GitHub↗

    This is a Go package that wraps the Telegram Bot API, providing a client library for building automated bot applications. It handles the core tasks of authenticating a bot with an API token and then sending messages or receiving updates through either long-polling or webhooks. The library supports sending text and media messages to Telegram chats, with the ability to reply to specific messages in a conversation. For receiving updates, it offers both a configurable long-polling loop that processes updates as they arrive and a webhook receiver that accepts incoming HTTPS requests from Telegram

    Gogolanghacktoberfesttelegram
    View on GitHub↗6,379
See all 30 alternatives to Pyrogram→

Frequently asked questions

What does pyrogram/pyrogram do?

Pyrogram is an asynchronous Python framework for interacting with the Telegram MTProto API. It serves as both a bot framework and a user client library, providing a concrete implementation of the MTProto protocol for secure communication with Telegram servers.

What are the main features of pyrogram/pyrogram?

The main features of pyrogram/pyrogram are: MTProto Implementations, Chat History APIs, Supergroup Configuration, Profile Information Retrieval, SDK Client Initialization, Graceful Shutdowns, API Request Execution, Bot Logic Frameworks.

What are some open-source alternatives to pyrogram/pyrogram?

Open-source alternatives to pyrogram/pyrogram include: danog/madelineproto — MadelineProto is an asynchronous PHP library that provides a programmatic interface for interacting with the Telegram… tdlib/td — This project is a cross-platform messaging SDK and client development library used to build custom Telegram… vysheng/tg — This project is a Telegram command line interface and MTProto client. It functions as a userbot framework, providing a… go-telegram-bot-api/telegram-bot-api — This is a Go package that wraps the Telegram Bot API, providing a client library for building automated bot… mpusher/mpush — Mpush is a real-time message push system and encrypted messaging gateway designed to deliver instant notifications to… ayugram/ayugramdesktop — AyuGramDesktop is a modified Telegram desktop client and MTProto messaging client. It functions as a local message…