Skip to content

Commit 95e16c2

Browse files
committed
Rename and rework Installation docs page
1 parent f5159e3 commit 95e16c2

File tree

5 files changed

+53
-39
lines changed

5 files changed

+53
-39
lines changed

docs/source/start/Installation.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
Installation
2+
============
3+
4+
Being a Python library, Pyrogram requires Python to be installed in your system.
5+
We recommend using the latest version of Python 3 and pip.
6+
7+
Get Python 3 from https://www.python.org/downloads/ or with your package manager and pip
8+
by following the instructions at https://pip.pypa.io/en/latest/installing/.
9+
10+
Pyrogram supports Python 3 only, starting from version 3.4 and PyPy.
11+
12+
Install Pyrogram
13+
----------------
14+
15+
- The easiest way to install and upgrade Pyrogram is by using **pip**:
16+
17+
.. code-block:: bash
18+
19+
$ pip3 install --upgrade pyrogram
20+
21+
- or, with TgCrypto_ (recommended):
22+
23+
.. code-block:: bash
24+
25+
$ pip3 install --upgrade pyrogram[tgcrypto]
26+
27+
Bleeding Edge
28+
-------------
29+
30+
If you want the latest development version of Pyrogram, you can install it straight from the develop_
31+
branch using this command:
32+
33+
.. code-block:: bash
34+
35+
$ pip3 install --upgrade git+https://github.com/pyrogram/pyrogram.git
36+
37+
Verifying
38+
---------
39+
40+
To verify that Pyrogram is correctly installed, open a Python shell and import it.
41+
If no error shows up you are good to go.
42+
43+
.. code-block:: bash
44+
45+
>>> import pyrogram
46+
>>> pyrogram.__version__
47+
'0.7.5'
48+
49+
.. _TgCrypto: https://docs.pyrogram.ml/resources/TgCrypto
50+
.. _develop: http://github.com/pyrogram/pyrogram

docs/source/start/QuickInstallation.rst

Lines changed: 0 additions & 37 deletions
This file was deleted.

pyrogram/api/errors/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
# You should have received a copy of the GNU Lesser General Public License
1717
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818

19-
from .exceptions import *
2019
from .error import UnknownError
20+
from .exceptions import *

pyrogram/client/handlers/disconnect_handler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ class DisconnectHandler(Handler):
3434
The Client itself. Useful, for example, when you want to change the proxy before a new connection
3535
is established.
3636
"""
37+
3738
def __init__(self, callback: callable):
3839
super().__init__(callback)

pyrogram/client/types/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from .location import Location
3131
from .message import Message
3232
from .message_entity import MessageEntity
33+
from .messages import Messages
3334
from .photo_size import PhotoSize
3435
from .reply_markup import (
3536
ForceReply, InlineKeyboardButton, InlineKeyboardMarkup,
@@ -43,4 +44,3 @@
4344
from .video import Video
4445
from .video_note import VideoNote
4546
from .voice import Voice
46-
from .messages import Messages

0 commit comments

Comments
 (0)