aioworkers-redis

Module for working with redis


Keywords
aioworkers, redis, asyncio, python
License
Apache-2.0
Install
pip install aioworkers-redis==0.9.0

Documentation

aioworkers-redis

Redis plugin for aioworkers.

Code style: ruff Code style: Mypy Documentation Status Python versions Hatch project

Features

Usage

Add this to aioworkers config.yaml:

redis:
    cls: aioworkers_redis.base.Connector
    prefix: app
    connection:
        host: localhost
        port: 6379
        maxsize: 20
queue:
    cls: aioworkers_redis.queue.Queue
    connection: .redis
    format: json
    key: queue

You can work with redis queue like this:

await context.queue.put({'a': 1})
d = await context.queue.get()

Development

Check code:

hatch run lint:all

Format code:

hatch run lint:fmt

Run tests:

hatch run pytest

Run tests with coverage:

hatch run cov