get_redis_async

async privex.helpers.plugin.get_redis_async(new_connection=False, thread_id=None, **rd_config) → <module ‘aioredis.connection’ from ‘/home/docs/checkouts/readthedocs.org/user_builds/python-helpers/envs/latest/lib/python3.7/site-packages/aioredis/connection.py’>[source]

Get an Async Redis connection object. Create one if it doesn’t exist.

Usage:

>>> redis_conn = await get_redis_async()
>>> redis = await redis_conn
>>> await redis.set('some_key', 'example')
>>> await redis.get('some_key')
'example'