mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Update docs
This commit is contained in:
parent
deb5c17612
commit
4049886e7a
@ -2659,7 +2659,7 @@ button[disabled]{
|
||||
background-color:#27AE60;
|
||||
text-decoration:none;
|
||||
font-weight:normal;
|
||||
font-family:"Open Sans","proxima-nova","Helvetica Neue",Arial,sans-serif;
|
||||
font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
|
||||
box-shadow:0px 1px 2px -1px rgba(255,255,255,0.5) inset,0px -2px 0px 0px rgba(0,0,0,0.1) inset;
|
||||
outline-none:false;
|
||||
vertical-align:middle;
|
||||
@ -3056,7 +3056,7 @@ input{
|
||||
input[type="button"],input[type="reset"],input[type="submit"]{
|
||||
-webkit-appearance:button;
|
||||
cursor:pointer;
|
||||
font-family:"Open Sans","proxima-nova","Helvetica Neue",Arial,sans-serif;
|
||||
font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
|
||||
*overflow:visible
|
||||
}
|
||||
input[type="text"],input[type="password"],input[type="email"],input[type="url"],input[type="date"],input[type="month"],input[type="time"],input[type="datetime"],input[type="datetime-local"],input[type="week"],input[type="number"],input[type="search"],input[type="tel"],input[type="color"]{
|
||||
@ -3065,7 +3065,7 @@ input[type="text"],input[type="password"],input[type="email"],input[type="url"],
|
||||
display:inline-block;
|
||||
border:1px solid #ccc;
|
||||
font-size:80%;
|
||||
font-family:"Open Sans","proxima-nova","Helvetica Neue",Arial,sans-serif;
|
||||
font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
|
||||
box-shadow:inset 0 1px 3px #ddd;
|
||||
border-radius:0;
|
||||
-webkit-transition:border 0.3s linear;
|
||||
@ -3129,7 +3129,7 @@ textarea{
|
||||
overflow:auto;
|
||||
vertical-align:top;
|
||||
width:100%;
|
||||
font-family:"Open Sans","proxima-nova","Helvetica Neue",Arial,sans-serif
|
||||
font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif
|
||||
}
|
||||
select,textarea{
|
||||
padding:.5em .625em;
|
||||
@ -3490,7 +3490,7 @@ html{
|
||||
overflow-x:hidden
|
||||
}
|
||||
body{
|
||||
font-family:"Open Sans","proxima-nova","Helvetica Neue",Arial,sans-serif;
|
||||
font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
|
||||
font-weight:normal;
|
||||
color:#404040;
|
||||
min-height:100%;
|
||||
@ -3606,7 +3606,8 @@ code.code-large,.rst-content tt.code-large{
|
||||
}
|
||||
.wy-plain-list-disc li,.rst-content .section ul li,.rst-content .toctree-wrapper ul li,article ul li{
|
||||
list-style:disc;
|
||||
margin-left:24px
|
||||
margin-left:24px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.wy-plain-list-disc li p:last-child,.rst-content .section ul li p:last-child,.rst-content .toctree-wrapper ul li p:last-child,article ul li p:last-child{
|
||||
margin-bottom:0
|
||||
@ -4143,7 +4144,7 @@ footer span.commit code,footer span.commit .rst-content tt,.rst-content footer s
|
||||
margin-left:0
|
||||
}
|
||||
.wy-nav-content-wrap .wy-nav-content{
|
||||
padding:1.618em
|
||||
padding:1.2em
|
||||
}
|
||||
.wy-nav-content-wrap.shift{
|
||||
position:fixed;
|
||||
@ -4179,7 +4180,7 @@ footer span.commit code,footer span.commit .rst-content tt,.rst-content footer s
|
||||
color:#fcfcfc;
|
||||
background:#1f1d1d;
|
||||
border-top:solid 10px #343131;
|
||||
font-family:"Open Sans","proxima-nova","Helvetica Neue",Arial,sans-serif;
|
||||
font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;
|
||||
z-index:400
|
||||
}
|
||||
.rst-versions a{
|
||||
|
@ -87,7 +87,7 @@
|
||||
<meta name="description" content="Telegram MTProto API Client Library for Python">
|
||||
<meta name="theme-color" content="#5c5a55">
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,600|Roboto+Slab:400" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato:400,400i,700,700i|Roboto+Slab:400" rel="stylesheet">
|
||||
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-84734363-2"></script>
|
||||
<script>
|
||||
|
@ -38,38 +38,8 @@ Welcome to Pyrogram
|
||||
About
|
||||
-----
|
||||
|
||||
Pyrogram is a fully functional Telegram Client Library written from the ground up in Python.
|
||||
It offers **simple** and **complete** access to the Telegram Messenger API and is designed for Python developers
|
||||
keen on building custom Telegram applications.
|
||||
|
||||
Features
|
||||
--------
|
||||
|
||||
- **Easy to setup**: Pyrogram can be easily installed and upgraded using **pip**, requires
|
||||
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
|
||||
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
|
||||
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
|
||||
Telegram Crypto Library written in C as a Python extension.
|
||||
|
||||
- **Updated**: Pyrogram makes use of the latest Telegram API version, currently `Layer 75`_.
|
||||
|
||||
- **Documented**: Pyrogram API public methods are documented and resemble the well
|
||||
established Telegram Bot API, thus offering a familiar look to Bot developers.
|
||||
|
||||
- **Full API support**: Beside the simple, bot-like methods offered by the Pyrogram API,
|
||||
the library also provides a complete, low-level access to every single Telegram API method.
|
||||
|
||||
Preview
|
||||
-------
|
||||
**Pyrogram** is a brand new Telegram_ Client Library written from the ground up in Python and C. It can be used for building
|
||||
custom Telegram applications in Python that interact with the MTProto API as both User and Bot.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@ -79,11 +49,27 @@ Preview
|
||||
client.start()
|
||||
|
||||
client.send_message("me", "Hi there! I'm using Pyrogram")
|
||||
client.send_photo("me", "/home/dan/pic.jpg", "Nice photo!")
|
||||
|
||||
client.stop()
|
||||
|
||||
To get started, press Next.
|
||||
Features
|
||||
--------
|
||||
|
||||
- **Easy to setup**: Pyrogram can be easily installed using pip and requires very few lines of code to get started with.
|
||||
|
||||
- **Easy to use**: Pyrogram provides idiomatic, clean and readable Python code making the Telegram API simple to use.
|
||||
|
||||
- **High-level**: Pyrogram automatically handles all the low-level details of communication with Telegram servers.
|
||||
|
||||
- **Updated**: Pyrogram makes use of the latest Telegram MTProto API version, currently Layer 76.
|
||||
|
||||
- **Fast**: Pyrogram critical parts are boosted up by `TgCrypto`_, a high-performance Crypto Library written in pure C.
|
||||
|
||||
- **Documented**: Pyrogram API methods are documented and resemble the well established Telegram Bot API,
|
||||
thus offering a familiar look to Bot developers.
|
||||
|
||||
- **Full API support**: Beside the simple Bot API-like methods, Pyrogram also provides an easy access to every single
|
||||
Telegram MTProto API method allowing you to programmatically execute any action an official client is able to do, and more.
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
@ -118,8 +104,6 @@ To get started, press Next.
|
||||
functions/index
|
||||
types/index
|
||||
|
||||
.. _`MTProto Mobile Protocol v2.0`: https://core.telegram.org/mtproto
|
||||
.. _`Telegram`: https://telegram.org/
|
||||
|
||||
.. _TgCrypto: https://docs.pyrogram.ml/resources/TgCrypto/
|
||||
|
||||
.. _`Layer 75`: https://github.com/pyrogram/pyrogram/blob/master/compiler/api/source/main_api.tl
|
@ -15,7 +15,7 @@ Inline Bots
|
||||
# Get bot results for "Fuzz Universe" from the inline bot @vid
|
||||
bot_results = client.get_inline_bot_results("vid", "Fuzz Universe")
|
||||
|
||||
.. figure:: ../_images/get_inline_bot_results.png
|
||||
.. figure:: https://i.imgur.com/IAqLs54.png
|
||||
:width: 90%
|
||||
:align: center
|
||||
:figwidth: 60%
|
||||
@ -31,7 +31,7 @@ Inline Bots
|
||||
# Send the first result (bot_results.results[0]) to your own chat (Saved Messages)
|
||||
client.send_inline_bot_result("me", bot_results.query_id, bot_results.results[0].id)
|
||||
|
||||
.. figure:: ../_images/send_inline_bot_result.png
|
||||
.. figure:: https://i.imgur.com/wwxr7B7.png
|
||||
:width: 90%
|
||||
:align: center
|
||||
:figwidth: 60%
|
||||
|
@ -7,12 +7,6 @@ The most straightforward and recommended way to install or upgrade Pyrogram is b
|
||||
|
||||
$ pip3 install --upgrade pyrogram
|
||||
|
||||
Or, with TgCrypto_:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ pip3 install --upgrade pyrogram[tgcrypto]
|
||||
|
||||
Bleeding Edge
|
||||
-------------
|
||||
|
||||
@ -22,14 +16,6 @@ If you want the latest development version of the library, you can either instal
|
||||
|
||||
$ pip3 install --upgrade git+https://github.com/pyrogram/pyrogram.git
|
||||
|
||||
Or manually, using:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
$ git clone https://github.com/pyrogram/pyrogram.git
|
||||
$ cd pyrogram
|
||||
$ python setup.py install
|
||||
|
||||
Verifying
|
||||
---------
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user