mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-23 02:17:21 +00:00
Update Installation page
Hint about asyncio
This commit is contained in:
parent
5d4e4a4842
commit
d580a78787
@ -14,17 +14,17 @@ by following the instructions at https://pip.pypa.io/en/latest/installing/.
|
|||||||
Install Pyrogram
|
Install Pyrogram
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
- The easiest way to install and upgrade Pyrogram is by using **pip**:
|
- The easiest way to install and upgrade Pyrogram to its latest stable version is by using **pip**:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: text
|
||||||
|
|
||||||
$ pip3 install --upgrade pyrogram
|
$ pip3 install --upgrade pyrogram
|
||||||
|
|
||||||
- or, with TgCrypto_ (recommended):
|
- or, with TgCrypto_ as extra requirement (recommended):
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: text
|
||||||
|
|
||||||
$ pip3 install --upgrade pyrogram[tgcrypto]
|
$ pip3 install --upgrade pyrogram[fast]
|
||||||
|
|
||||||
Bleeding Edge
|
Bleeding Edge
|
||||||
-------------
|
-------------
|
||||||
@ -32,17 +32,49 @@ Bleeding Edge
|
|||||||
If you want the latest development version of Pyrogram, you can install it straight from the develop_
|
If you want the latest development version of Pyrogram, you can install it straight from the develop_
|
||||||
branch using this command (you might need to install **git** first):
|
branch using this command (you might need to install **git** first):
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: text
|
||||||
|
|
||||||
$ pip3 install --upgrade git+https://github.com/pyrogram/pyrogram.git
|
$ pip3 install --upgrade git+https://github.com/pyrogram/pyrogram.git
|
||||||
|
|
||||||
|
Asynchronous
|
||||||
|
------------
|
||||||
|
|
||||||
|
Pyrogram heavily depends on IO-bound network code (it's a cloud-based messaging client library after all), and here's
|
||||||
|
where asyncio shines the most by providing extra performance while running on a single OS-level thread only.
|
||||||
|
|
||||||
|
**A fully asynchronous variant of Pyrogram is therefore available** (Python 3.5+ required).
|
||||||
|
Use this command to install:
|
||||||
|
|
||||||
|
.. code-block:: text
|
||||||
|
|
||||||
|
$ pip3 install --upgrade git+https://github.com/pyrogram/pyrogram.git@asyncio
|
||||||
|
|
||||||
|
|
||||||
|
Pyrogram API remains the same and features are kept up to date from the non-async, default develop branch.
|
||||||
|
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
The idea to turn Pyrogram fully asynchronous is still under consideration, but is wise to expect that in future this
|
||||||
|
would be the one and only way to work with Pyrogram.
|
||||||
|
|
||||||
|
.. raw:: html
|
||||||
|
|
||||||
|
<script async
|
||||||
|
src="https://telegram.org/js/telegram-widget.js?4"
|
||||||
|
data-telegram-post="Pyrogram/4"
|
||||||
|
data-width="100%">
|
||||||
|
</script>
|
||||||
|
|
||||||
|
.. centered:: Subscribe to `@Pyrogram <https://t.me/Pyrogram>`_ for news and announcements
|
||||||
|
|
||||||
Verifying
|
Verifying
|
||||||
---------
|
---------
|
||||||
|
|
||||||
To verify that Pyrogram is correctly installed, open a Python shell and import it.
|
To verify that Pyrogram is correctly installed, open a Python shell and import it.
|
||||||
If no error shows up you are good to go.
|
If no error shows up you are good to go.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: python
|
||||||
|
|
||||||
>>> import pyrogram
|
>>> import pyrogram
|
||||||
>>> pyrogram.__version__
|
>>> pyrogram.__version__
|
||||||
|
Loading…
x
Reference in New Issue
Block a user