aiogram/docs/source/install.rst

53 lines
1.3 KiB
ReStructuredText
Raw Normal View History

2017-06-03 11:58:26 +03:00
Installation Guide
==================
2018-01-23 13:37:17 +03:00
Using PIP
---------
2017-06-03 11:58:26 +03:00
.. code-block:: bash
2017-06-03 15:04:04 +03:00
$ pip install -U aiogram
2017-06-03 11:58:26 +03:00
From sources
------------
.. code-block:: bash
2018-01-23 13:37:17 +03:00
$ git clone https://github.com/aiogram/aiogram.git
$ cd aiogram
2017-06-03 11:58:26 +03:00
$ python setup.py install
2018-09-07 21:24:13 +03:00
or if you want to install development version (maybe unstable):
.. code-block:: bash
$ git clone https://github.com/aiogram/aiogram.git
$ cd aiogram
$ git checkout dev-2.x
$ python setup.py install
Recommendations
---------------
You can speedup your bots by following next instructions:
- Use `uvloop <https://github.com/MagicStack/uvloop>`_ instead of default asyncio loop.
*uvloop* is a fast, drop-in replacement of the built-in asyncio event loop. uvloop is implemented in Cython and uses libuv under the hood.
**Installation:**
.. code-block:: bash
$ pip install uvloop
- Use `ujson <https://github.com/esnme/ultrajson>`_ instead of default json module.
*UltraJSON* is an ultra fast JSON encoder and decoder written in pure C with bindings for Python 2.5+ and 3.
**Installation:**
.. code-block:: bash
$ pip install ujson
In addition, you don't need do nothing, *aiogram* is automatically starts using that if is found in your environment.