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
2019-10-14 16:11:13 +03:00
Using Pipenv
------------
.. code-block :: bash
$ pipenv install aiogram
2021-01-12 14:31:08 -06:00
Using Pacman
2019-08-19 00:11:05 +05:00
---------
2021-01-12 14:31:08 -06:00
*aiogram* is also available in Arch Linux Repository, so you can install this framework on any Arch-based distribution like Arch Linux, Antergos, Manjaro, etc. To do this, just use pacman to install the `python-aiogram <https://archlinux.org/packages/community/any/python-aiogram/> `_ package:
.. code-block :: bash
$ pacman -S python-aiogram
2019-08-19 00:11:05 +05:00
2017-06-03 11:58:26 +03:00
From sources
------------
2019-10-14 16:11:13 +03:00
Development versions:
2017-06-03 11:58:26 +03:00
.. 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-01-27 11:13:12 +02:00
2021-01-22 09:49:46 +02:00
Or if you want to install stable version (The same with version from PyPi):
2018-09-07 21:24:13 +03:00
.. code-block :: bash
$ git clone https://github.com/aiogram/aiogram.git
$ cd aiogram
2019-10-14 16:11:13 +03:00
$ git checkout master
2018-09-07 21:24:13 +03:00
$ python setup.py install
2018-01-27 11:13:12 +02:00
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
2020-03-29 11:24:23 +05:30
- Use `ujson <https://github.com/esnme/ultrajson> `_ instead of the default json module.
2018-01-27 11:13:12 +02:00
*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
2019-10-15 18:00:37 +04:00
- Use aiohttp speedups
2020-03-29 11:24:23 +05:30
- Use `cchardet <https://github.com/PyYoshi/cChardet> `_ instead of the chardet module.
2019-10-15 18:00:37 +04:00
2020-03-29 11:24:23 +05:30
*cChardet* is a high speed universal character encoding detector.
2019-10-15 18:00:37 +04:00
**Installation:**
.. code-block :: bash
$ pip install cchardet
- Use `aiodns <https://github.com/saghul/aiodns> `_ for speeding up DNS resolving.
*aiodns* provides a simple way for doing asynchronous DNS resolutions.
**Installation:**
.. code-block :: bash
$ pip install aiodns
- Installing speedups altogether.
2019-10-15 18:04:14 +04:00
The following will get you `` aiohttp `` along with `` cchardet `` , `` aiodns `` and `` brotlipy `` in one bundle.
2019-10-15 18:00:37 +04:00
**Installation:**
.. code-block :: bash
$ pip install aiohttp[speedups]
2020-03-29 11:24:23 +05:30
In addition, you don't need do anything, *aiogram* automatically starts using that if it is found in your environment.