Pyrogram for MTPager for testing purposes
Go to file
2019-03-22 11:35:35 +01:00
compiler Merge branch 'develop' into inline-mode 2019-03-21 17:40:49 +01:00
docs Clean up inline-mode 2019-03-22 11:35:35 +01:00
examples Update sticker file_id 2019-02-12 20:59:22 +01:00
pyrogram Clean up inline-mode 2019-03-22 11:35:35 +01:00
.gitignore Ignore user's personal files 2017-12-05 12:48:55 +01:00
COPYING Initial commit 2017-12-05 12:09:33 +01:00
COPYING.lesser Initial commit 2017-12-05 12:09:33 +01:00
MANIFEST.in Remove requirements_extras.txt from MANIFEST.in 2018-06-24 14:26:52 +02:00
NOTICE Update copyright year 2019-01-01 12:36:16 +01:00
README.rst Update README.rst 2019-03-13 14:51:23 +01:00
requirements.txt Revert "Remove typing from requirements" 2019-02-07 16:26:12 +01:00
setup.py Fix PyPI readme render 2019-02-04 16:29:13 +01:00

|header|

Pyrogram
========

.. code-block:: python

    from pyrogram import Client, Filters

    app = Client("my_account")


    @app.on_message(Filters.private)
    def hello(client, message):
        message.reply("Hello {}".format(message.from_user.first_name))


    app.run()

**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 create custom apps using both user and bot identities (bot API alternative) via the `MTProto API`_.

    `Pyrogram in fully-asynchronous mode is also available » <https://github.com/pyrogram/pyrogram/issues/181>`_
    
    `Working PoC of Telegram voice calls using Pyrogram » <https://github.com/bakatrouble/pytgvoip>`_

Features
--------

-   **Easy**: You can install Pyrogram with pip and start building your applications right away.
-   **Elegant**: Low-level details are abstracted and re-presented in a much nicer and easier way.
-   **Fast**: Crypto parts are boosted up by TgCrypto_, a high-performance library written in pure C.
-   **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 95 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.

Requirements
------------

-   Python 3.4 or higher.
-   A `Telegram API key`_.

Installing
----------

.. code:: shell

    pip3 install pyrogram

Resources
---------

-   The Docs contain lots of resources to help you getting started with Pyrogram: https://docs.pyrogram.ml.
-   Reading `Examples in this repository`_ is also a good way for learning how Pyrogram works.
-   Seeking extra help? Don't be shy, come join and ask our Community_!
-   For other requests you can send an Email_ or a Message_.

Contributing
------------

Pyrogram is brand new, and **you are welcome to try it and help make it even better** by either submitting pull
requests or reporting issues/bugs as well as suggesting best practices, ideas, enhancements on both code
and documentation. Any help is appreciated!

Copyright & License
-------------------

-   Copyright (C) 2017-2019 Dan Tès <https://github.com/delivrance>
-   Licensed under the terms of the `GNU Lesser General Public License v3 or later (LGPLv3+)`_

.. _`Telegram`: https://telegram.org/
.. _`MTProto API`: https://core.telegram.org/api#telegram-api
.. _`Telegram API key`: https://docs.pyrogram.ml/start/ProjectSetup#api-keys
.. _`Community`: https://t.me/PyrogramChat
.. _`Examples in this repository`: https://github.com/pyrogram/pyrogram/tree/master/examples
.. _`GitHub`: https://github.com/pyrogram/pyrogram/issues
.. _`Email`: admin@pyrogram.ml
.. _`Message`: https://t.me/haskell
.. _TgCrypto: https://github.com/pyrogram/tgcrypto
.. _`MTProto 2.0`: https://core.telegram.org/mtproto
.. _`GNU Lesser General Public License v3 or later (LGPLv3+)`: COPYING.lesser

.. |header| raw:: html

    <h1 align="center">
        <a href="https://github.com/pyrogram/pyrogram">
            <div><img src="https://raw.githubusercontent.com/pyrogram/logos/master/logos/pyrogram_logo2.png" alt="Pyrogram Logo"></div>
        </a>
    </h1>

    <p align="center">
        <b>Telegram MTProto API Framework for Python</b>

        <br>
        <a href="https://docs.pyrogram.ml">
            Documentation
        </a>
        •
        <a href="https://github.com/pyrogram/pyrogram/releases">
            Changelog
        </a>
        •
        <a href="https://t.me/PyrogramChat">
            Community
        </a>
        <br>
        <a href="compiler/api/source/main_api.tl">
            <img src="https://img.shields.io/badge/schema-layer%2095-eda738.svg?longCache=true&colorA=262b30"
                alt="Schema Layer">
        </a>
        <a href="https://github.com/pyrogram/tgcrypto">
            <img src="https://img.shields.io/badge/tgcrypto-v1.1.1-eda738.svg?longCache=true&colorA=262b30"
                alt="TgCrypto Version">
        </a>
    </p>

.. |logo| image:: https://raw.githubusercontent.com/pyrogram/logos/master/logos/pyrogram_logo2.png
    :target: https://pyrogram.ml
    :alt: Pyrogram

.. |description| replace:: **Telegram MTProto API Framework for Python**

.. |schema| image:: https://img.shields.io/badge/schema-layer%2095-eda738.svg?longCache=true&colorA=262b30
    :target: compiler/api/source/main_api.tl
    :alt: Schema Layer

.. |tgcrypto| image:: https://img.shields.io/badge/tgcrypto-v1.1.1-eda738.svg?longCache=true&colorA=262b30
    :target: https://github.com/pyrogram/tgcrypto
    :alt: TgCrypto Version