1aioredis 2======== 3 4asyncio (PEP 3156) Redis client library. 5 6.. image:: https://travis-ci.com/aio-libs/aioredis.svg?branch=master 7 :target: https://travis-ci.com/aio-libs/aioredis 8 9 10.. image:: https://codecov.io/gh/aio-libs/aioredis/branch/master/graph/badge.svg 11 :target: https://codecov.io/gh/aio-libs/aioredis 12 13.. image:: https://ci.appveyor.com/api/projects/status/wngyx6s98o6hsxmt/branch/master?svg=true 14 :target: https://ci.appveyor.com/project/popravich/aioredis 15 16Features 17-------- 18 19================================ ============================== 20hiredis_ parser Yes 21Pure-python parser Yes 22Low-level & High-level APIs Yes 23Connections Pool Yes 24Pipelining support Yes 25Pub/Sub support Yes 26SSL/TLS support Yes 27Sentinel support Yes 28Redis Cluster support WIP 29Trollius (python 2.7) No 30Tested CPython versions `3.5.3, 3.6, 3.7 <travis_>`_ [1]_ 31Tested PyPy3 versions `pypy3.5-7.0 pypy3.6-7.1.1 <travis_>`_ 32Tested for Redis server `2.6, 2.8, 3.0, 3.2, 4.0 5.0 <travis_>`_ 33Support for dev Redis server through low-level API 34================================ ============================== 35 36.. [1] For Python 3.3, 3.4 support use aioredis v0.3. 37 38Documentation 39------------- 40 41http://aioredis.readthedocs.io/ 42 43Usage example 44------------- 45 46Simple high-level interface with connections pool: 47 48.. code:: python 49 50 import asyncio 51 import aioredis 52 53 async def go(): 54 redis = await aioredis.create_redis_pool( 55 'redis://localhost') 56 await redis.set('my-key', 'value') 57 val = await redis.get('my-key', encoding='utf-8') 58 print(val) 59 redis.close() 60 await redis.wait_closed() 61 62 asyncio.run(go()) 63 # will print 'value' 64 65Requirements 66------------ 67 68* Python_ 3.5.3+ 69* hiredis_ 70 71.. note:: 72 73 hiredis is preferred requirement. 74 Pure-python protocol parser is implemented as well and can be used 75 through ``parser`` parameter. 76 77Benchmarks 78---------- 79 80Benchmarks can be found here: https://github.com/popravich/python-redis-benchmark 81 82Discussion list 83--------------- 84 85*aio-libs* google group: https://groups.google.com/forum/#!forum/aio-libs 86 87Or gitter room: https://gitter.im/aio-libs/Lobby 88 89License 90------- 91 92The aioredis is offered under MIT license. 93 94.. _Python: https://www.python.org 95.. _hiredis: https://pypi.python.org/pypi/hiredis 96.. _travis: https://travis-ci.com/aio-libs/aioredis 97