mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-24 15:59:18 +00:00
Update README.rst
This commit is contained in:
parent
a956463a57
commit
61ba9dca8b
79
README.rst
79
README.rst
@ -29,42 +29,33 @@ Table of Contents
|
|||||||
About
|
About
|
||||||
=====
|
=====
|
||||||
|
|
||||||
**Pyrogram** is a fully functional Telegram Client Library written from the ground up in Python.
|
**Pyrogram** is a brand new Telegram_ Client Library written from the ground up in Python and C. It can be used for building
|
||||||
It offers simple and complete access to the `Telegram Messenger API`_ and is designed for Python
|
custom Telegram applications in Python that interact with the MTProto API as both User and Bot.
|
||||||
developers keen on building custom Telegram applications.
|
|
||||||
|
|
||||||
|
|
||||||
Features
|
Features
|
||||||
--------
|
--------
|
||||||
|
|
||||||
- **Easy to setup**: Pyrogram can be easily installed and upgraded using **pip**, requires
|
- **Easy to setup**: Pyrogram can be easily installed using pip and requires very few lines of code to get started with.
|
||||||
a minimal set of dependencies (which are also automatically managed) and very few lines
|
|
||||||
of code to get started with.
|
|
||||||
|
|
||||||
- **Easy to use**: Pyrogram provides idiomatic, developer-friendly, clean and readable
|
- **Easy to use**: Pyrogram provides idiomatic, clean and readable Python code making the Telegram API simple to use.
|
||||||
Python code (either generated or hand-written) making the Telegram API simple to use.
|
|
||||||
|
|
||||||
- **High level**: Pyrogram automatically handles all the low-level details of
|
- **High-level**: Pyrogram automatically handles all the low-level details of communication with Telegram servers.
|
||||||
communication with the Telegram servers by implementing the
|
|
||||||
`MTProto Mobile Protocol v2.0`_ and the mechanisms needed for establishing
|
|
||||||
a reliable connection.
|
|
||||||
|
|
||||||
- **Fast**: Pyrogram's speed is boosted up by `TgCrypto`_, a high-performance, easy-to-install
|
- **Updated**: Pyrogram makes use of the latest Telegram MTProto API version, currently Layer 76.
|
||||||
Telegram Crypto Library written in C as a Python extension.
|
|
||||||
|
|
||||||
- **Updated**: Pyrogram makes use of the latest Telegram API version, currently `Layer 75`_.
|
- **Fast**: Pyrogram critical parts are boosted up by `TgCrypto`_, a high-performance Crypto Library written in pure C.
|
||||||
|
|
||||||
- **Documented**: Pyrogram API public methods are documented and resemble the well
|
- **Documented**: Pyrogram API methods are documented and resemble the well established Telegram Bot API,
|
||||||
established Telegram Bot API, thus offering a familiar look to Bot developers.
|
thus offering a familiar look to Bot developers.
|
||||||
|
|
||||||
- **Full API support**: Beside the simple, bot-like methods offered by the Pyrogram API,
|
- **Full API support**: Beside the simple Bot API-like methods, Pyrogram also provides an easy access to every single
|
||||||
the library also provides a complete, low-level access to every single Telegram API method.
|
Telegram MTProto API method allowing you to programmatically execute any action an official client is able to do, and more.
|
||||||
|
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
- Python 3.3 or higher.
|
- Python 3.4 or higher.
|
||||||
|
|
||||||
- A Telegram API key.
|
- A Telegram API key.
|
||||||
|
|
||||||
@ -75,18 +66,12 @@ Getting Started
|
|||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
- You can easily install and upgrade the library using standard Python tools:
|
- You can install and upgrade Pyrogram using pip:
|
||||||
|
|
||||||
.. code:: shell
|
.. code:: shell
|
||||||
|
|
||||||
$ pip3 install --upgrade pyrogram
|
$ pip3 install --upgrade pyrogram
|
||||||
|
|
||||||
- Or, with TgCrypto_:
|
|
||||||
|
|
||||||
.. code:: shell
|
|
||||||
|
|
||||||
$ pip3 install --upgrade pyrogram[tgcrypto]
|
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
@ -102,7 +87,7 @@ Configuration
|
|||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
- And here's how Pyrogram looks like:
|
- And here is how Pyrogram looks like:
|
||||||
|
|
||||||
.. code:: python
|
.. code:: python
|
||||||
|
|
||||||
@ -112,26 +97,25 @@ Usage
|
|||||||
client.start()
|
client.start()
|
||||||
|
|
||||||
client.send_message("me", "Hi there! I'm using Pyrogram")
|
client.send_message("me", "Hi there! I'm using Pyrogram")
|
||||||
client.send_photo("me", "/home/dan/pic.jpg", "Nice photo!")
|
|
||||||
|
|
||||||
client.stop()
|
client.stop()
|
||||||
|
|
||||||
That's all you need for getting started with Pyrogram. For more detailed information,
|
That's all you need for getting started with Pyrogram. For more detailed information,
|
||||||
please refer to the Documentation_.
|
please refer to the Documentation_ and the Examples_ folder.
|
||||||
|
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
=============
|
=============
|
||||||
|
|
||||||
- The entire Pyrogram's documentation resides at https://docs.pyrogram.ml.
|
- The entire Pyrogram documentation resides at https://docs.pyrogram.ml.
|
||||||
|
|
||||||
|
|
||||||
Contribution
|
Contribution
|
||||||
============
|
============
|
||||||
|
|
||||||
**You are very welcome to contribute** by either submitting pull requests or
|
Pyrogram is brand new! **You are welcome to try it and help make it better** by either submitting pull
|
||||||
reporting issues/bugs as well as suggesting best practices, ideas, enhancements
|
requests or reporting issues/bugs as well as suggesting best practices, ideas, enhancements on both code
|
||||||
on both code and documentation. Any help is appreciated!
|
and documentation. Any help is appreciated!
|
||||||
|
|
||||||
|
|
||||||
Feedback
|
Feedback
|
||||||
@ -140,7 +124,6 @@ Feedback
|
|||||||
Means for getting in touch:
|
Means for getting in touch:
|
||||||
|
|
||||||
- `Community`_
|
- `Community`_
|
||||||
- `Telegram`_
|
|
||||||
- `GitHub`_
|
- `GitHub`_
|
||||||
- `Email`_
|
- `Email`_
|
||||||
|
|
||||||
@ -154,15 +137,11 @@ License
|
|||||||
`GNU Lesser General Public License v3 or later (LGPLv3+)`_
|
`GNU Lesser General Public License v3 or later (LGPLv3+)`_
|
||||||
|
|
||||||
|
|
||||||
.. _`Telegram Messenger API`: https://core.telegram.org/api#telegram-api
|
.. _`Telegram`: https://telegram.org/
|
||||||
|
|
||||||
.. _`MTProto Mobile Protocol v2.0`: https://core.telegram.org/mtproto
|
.. _`your own`: https://docs.pyrogram.ml/start/ProjectSetup#api-keys
|
||||||
|
|
||||||
.. _`Layer 75`: compiler/api/source/main_api.tl
|
.. _`Examples`: https://github.com/pyrogram/pyrogram/blob/master/examples/README.md
|
||||||
|
|
||||||
.. _`your own`: https://docs.pyrogram.ml/start/ProjectSetup/#api-keys
|
|
||||||
|
|
||||||
.. _`Telegram`: https://t.me/haskell
|
|
||||||
|
|
||||||
.. _`Community`: https://t.me/PyrogramChat
|
.. _`Community`: https://t.me/PyrogramChat
|
||||||
|
|
||||||
@ -179,9 +158,9 @@ License
|
|||||||
.. |header| raw:: html
|
.. |header| raw:: html
|
||||||
|
|
||||||
<h1 align="center">
|
<h1 align="center">
|
||||||
<a href="https://pyrogram.ml">
|
<a href="https://github.com/pyrogram/pyrogram">
|
||||||
<div><img src="https://pyrogram.ml/images/icon.png" alt="Pyrogram Icon"></div>
|
<div><img src="https://media.pyrogram.ml/images/icon.png" alt="Pyrogram Icon"></div>
|
||||||
<div><img src="https://pyrogram.ml/images/label.png" alt="Pyrogram Label"></div>
|
<div><img src="https://media.pyrogram.ml/images/label.png" alt="Pyrogram Label"></div>
|
||||||
</a>
|
</a>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
@ -202,11 +181,11 @@ License
|
|||||||
</a>
|
</a>
|
||||||
<br><br>
|
<br><br>
|
||||||
<a href="compiler/api/source/main_api.tl">
|
<a href="compiler/api/source/main_api.tl">
|
||||||
<img src="https://www.pyrogram.ml/images/scheme.svg"
|
<img src="https://media.pyrogram.ml/images/scheme.svg"
|
||||||
alt="Scheme Layer 75">
|
alt="Scheme Layer 76">
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/pyrogram/tgcrypto">
|
<a href="https://github.com/pyrogram/tgcrypto">
|
||||||
<img src="https://www.pyrogram.ml/images/tgcrypto.svg"
|
<img src="https://media.pyrogram.ml/images/tgcrypto.svg"
|
||||||
alt="TgCrypto">
|
alt="TgCrypto">
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
@ -219,7 +198,7 @@ License
|
|||||||
|
|
||||||
.. |scheme| image:: https://www.pyrogram.ml/images/scheme.svg
|
.. |scheme| image:: https://www.pyrogram.ml/images/scheme.svg
|
||||||
:target: compiler/api/source/main_api.tl
|
:target: compiler/api/source/main_api.tl
|
||||||
:alt: Scheme Layer 75
|
:alt: Scheme Layer 76
|
||||||
|
|
||||||
.. |tgcrypto| image:: https://www.pyrogram.ml/images/tgcrypto.svg
|
.. |tgcrypto| image:: https://www.pyrogram.ml/images/tgcrypto.svg
|
||||||
:target: https://github.com/pyrogram/tgcrypto
|
:target: https://github.com/pyrogram/tgcrypto
|
||||||
|
Loading…
Reference in New Issue
Block a user