2018-01-15 12:36:03 +01:00
|
|
|
Welcome to Pyrogram
|
|
|
|
===================
|
|
|
|
|
2017-12-30 19:47:18 +01:00
|
|
|
.. raw:: html
|
|
|
|
|
2017-12-31 11:03:10 +01:00
|
|
|
<div align="center">
|
2018-03-22 13:01:18 +01:00
|
|
|
<a href="https://docs.pyrogram.ml">
|
2018-09-19 11:58:48 +02:00
|
|
|
<div><img src="_static/logo.png" alt="Pyrogram Logo"></div>
|
2018-01-01 13:55:05 +01:00
|
|
|
</a>
|
2017-12-31 11:03:10 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<p align="center">
|
2019-01-24 20:03:14 +01:00
|
|
|
<b>Telegram MTProto API Framework for Python</b>
|
|
|
|
|
2018-01-13 17:09:25 +01:00
|
|
|
<br>
|
2019-01-24 20:03:14 +01:00
|
|
|
<a href="https://docs.pyrogram.ml">
|
|
|
|
Documentation
|
2018-01-13 17:09:25 +01:00
|
|
|
</a>
|
|
|
|
•
|
2019-01-24 20:03:14 +01:00
|
|
|
<a href="https://github.com/pyrogram/pyrogram/releases">
|
|
|
|
Changelog
|
2018-01-13 17:09:25 +01:00
|
|
|
</a>
|
|
|
|
•
|
|
|
|
<a href="https://t.me/PyrogramChat">
|
|
|
|
Community
|
|
|
|
</a>
|
2018-10-14 10:48:17 +02:00
|
|
|
<br>
|
2019-01-24 20:03:14 +01:00
|
|
|
<a href="compiler/api/source/main_api.tl">
|
2018-12-26 19:44:22 +01:00
|
|
|
<img src="https://img.shields.io/badge/schema-layer%2091-eda738.svg?longCache=true&colorA=262b30"
|
2019-01-24 20:03:14 +01:00
|
|
|
alt="Schema Layer">
|
2018-01-10 20:56:43 +01:00
|
|
|
</a>
|
2018-02-17 14:44:59 +01:00
|
|
|
<a href="https://github.com/pyrogram/tgcrypto">
|
2018-10-14 11:14:10 +02:00
|
|
|
<img src="https://img.shields.io/badge/tgcrypto-v1.1.1-eda738.svg?longCache=true&colorA=262b30"
|
2019-01-24 20:03:14 +01:00
|
|
|
alt="TgCrypto Version">
|
2018-01-10 20:56:43 +01:00
|
|
|
</a>
|
2017-12-31 11:03:10 +01:00
|
|
|
</p>
|
2017-12-30 19:47:18 +01:00
|
|
|
|
2018-04-12 14:13:58 +02:00
|
|
|
.. code-block:: python
|
|
|
|
|
|
|
|
from pyrogram import Client, Filters
|
|
|
|
|
|
|
|
app = Client("my_account")
|
|
|
|
|
|
|
|
|
|
|
|
@app.on_message(Filters.private)
|
|
|
|
def hello(client, message):
|
2018-06-23 14:25:19 +02:00
|
|
|
message.reply("Hello {}".format(message.from_user.first_name))
|
2018-04-12 14:13:58 +02:00
|
|
|
|
|
|
|
|
2018-06-22 13:17:39 +02:00
|
|
|
app.run()
|
2018-04-12 14:13:58 +02:00
|
|
|
|
2019-01-25 09:43:56 +01:00
|
|
|
Welcome to Pyrogram's Documentation! Here you can find resources for learning how to use the framework.
|
2018-10-14 11:46:44 +02:00
|
|
|
Contents are organized into self-contained topics and can be accessed from the sidebar, or by following them in order
|
|
|
|
using the Next button at the end of each page. But first, here's a brief overview of what is this all about.
|
2018-03-26 03:58:10 +02:00
|
|
|
|
2018-04-15 20:56:06 +02:00
|
|
|
About
|
|
|
|
-----
|
2018-04-14 22:35:38 +02:00
|
|
|
|
2019-01-25 09:43:56 +01:00
|
|
|
**Pyrogram** is an elegant, easy-to-use Telegram_ client library and framework written from the ground up in Python and
|
|
|
|
C. It enables you to easily build custom Telegram applications that interact with the MTProto API as both user and bot.
|
2018-01-06 12:18:15 +01:00
|
|
|
|
2018-04-15 20:56:06 +02:00
|
|
|
Features
|
|
|
|
--------
|
2018-01-06 12:18:15 +01:00
|
|
|
|
2019-01-24 20:03:14 +01:00
|
|
|
- **Easy**: You can install Pyrogram with pip and start building your app right away.
|
|
|
|
- **Elegant**: Low-level details are abstracted and re-presented in a much nicer and easier way.
|
2018-04-15 20:56:06 +02:00
|
|
|
- **Fast**: Crypto parts are boosted up by TgCrypto_, a high-performance library written in pure C.
|
2019-01-24 20:03:14 +01:00
|
|
|
- **Documented**: Pyrogram API methods, types and public interfaces are well documented.
|
|
|
|
- **Type-hinted**: Exposed Pyrogram types and method parameters are all type-hinted.
|
|
|
|
- **Updated**, to the latest Telegram API version, currently Layer 91 on top of MTProto 2.0.
|
|
|
|
- **Pluggable**: The Smart Plugin system allows to write components with minimal boilerplate code.
|
|
|
|
- **Comprehensive**: Execute any advanced action an official client is able to do, and even more.
|
2018-01-06 12:18:15 +01:00
|
|
|
|
2018-03-26 03:58:10 +02:00
|
|
|
To get started, press the Next button.
|
|
|
|
|
2018-01-06 12:18:15 +01:00
|
|
|
.. toctree::
|
|
|
|
:hidden:
|
2018-06-05 16:35:54 +02:00
|
|
|
:caption: Quick Start
|
2018-01-06 12:18:15 +01:00
|
|
|
|
2018-06-05 16:35:54 +02:00
|
|
|
start/Installation
|
|
|
|
start/Setup
|
|
|
|
start/Usage
|
2018-01-06 12:18:15 +01:00
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:hidden:
|
|
|
|
:caption: Resources
|
|
|
|
|
|
|
|
resources/UpdateHandling
|
2018-08-19 17:25:39 +02:00
|
|
|
resources/UsingFilters
|
2019-01-02 18:11:22 +01:00
|
|
|
resources/MoreOnUpdates
|
2019-01-25 09:21:21 +01:00
|
|
|
resources/ConfigurationFile
|
2018-10-18 13:04:57 +02:00
|
|
|
resources/SmartPlugins
|
2018-04-15 20:56:06 +02:00
|
|
|
resources/AutoAuthorization
|
2018-06-27 00:11:53 +02:00
|
|
|
resources/CustomizeSessions
|
|
|
|
resources/TgCrypto
|
2018-04-15 20:56:06 +02:00
|
|
|
resources/TextFormatting
|
2018-06-27 00:11:53 +02:00
|
|
|
resources/SOCKS5Proxy
|
2018-02-27 16:54:33 +01:00
|
|
|
resources/BotsInteraction
|
2018-04-15 20:56:06 +02:00
|
|
|
resources/ErrorHandling
|
2018-12-26 20:08:11 +01:00
|
|
|
resources/TestServers
|
2018-12-28 16:19:42 +01:00
|
|
|
resources/AdvancedUsage
|
2019-02-04 12:53:33 +01:00
|
|
|
resources/VoiceCalls
|
2018-12-26 20:08:11 +01:00
|
|
|
resources/Changelog
|
2017-12-30 19:47:18 +01:00
|
|
|
|
|
|
|
.. toctree::
|
2018-01-06 12:18:15 +01:00
|
|
|
:hidden:
|
2018-01-04 03:05:16 +01:00
|
|
|
:caption: Main Package
|
2018-01-03 18:26:05 +01:00
|
|
|
|
2018-01-04 03:05:16 +01:00
|
|
|
pyrogram/index
|
2018-01-03 18:26:05 +01:00
|
|
|
|
|
|
|
.. toctree::
|
2018-01-06 12:18:15 +01:00
|
|
|
:hidden:
|
|
|
|
:caption: Telegram API
|
2018-01-03 18:26:05 +01:00
|
|
|
|
2018-01-03 18:36:23 +01:00
|
|
|
functions/index
|
2018-01-03 18:26:05 +01:00
|
|
|
types/index
|
2018-01-13 17:09:25 +01:00
|
|
|
|
2018-03-24 14:47:20 +01:00
|
|
|
.. _`Telegram`: https://telegram.org/
|
2018-06-05 16:35:54 +02:00
|
|
|
.. _TgCrypto: https://docs.pyrogram.ml/resources/TgCrypto/
|