Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aioworkers/aioworkers-redis
Module for working with redis
https://github.com/aioworkers/aioworkers-redis
aioworkers asyncio python redis
Last synced: about 1 month ago
JSON representation
Module for working with redis
- Host: GitHub
- URL: https://github.com/aioworkers/aioworkers-redis
- Owner: aioworkers
- License: apache-2.0
- Created: 2017-04-28T10:14:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-27T13:06:09.000Z (about 2 months ago)
- Last Synced: 2024-10-27T14:35:55.851Z (about 2 months ago)
- Topics: aioworkers, asyncio, python, redis
- Language: Python
- Homepage:
- Size: 106 KB
- Stars: 3
- Watchers: 6
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
aioworkers-redis
================Redis plugin for `aioworkers`.
.. image:: https://img.shields.io/pypi/v/aioworkers-redis.svg
:target: https://pypi.org/project/aioworkers-redis.. image:: https://github.com/aioworkers/aioworkers-redis/workflows/Tests/badge.svg
:target: https://github.com/aioworkers/aioworkers-redis/actions?query=workflow%3ATests.. image:: https://codecov.io/gh/aioworkers/aioworkers-redis/branch/master/graph/badge.svg
:target: https://codecov.io/gh/aioworkers/aioworkers-redis
:alt: Coverage.. image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v0.json
:target: https://github.com/charliermarsh/ruff
:alt: Code style: ruff.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
:alt: Code style: black.. image:: https://img.shields.io/badge/types-Mypy-blue.svg
:target: https://github.com/python/mypy
:alt: Code style: Mypy.. image:: https://readthedocs.org/projects/aioworkers-redis/badge/?version=latest
:target: https://github.com/aioworkers/aioworkers-redis#readme
:alt: Documentation Status.. image:: https://img.shields.io/pypi/pyversions/aioworkers-redis.svg
:target: https://pypi.org/project/aioworkers-redis
:alt: Python versions.. image:: https://img.shields.io/pypi/dm/aioworkers-redis.svg
:target: https://pypi.org/project/aioworkers-redis.. image:: https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg
:alt: Hatch project
:target: https://github.com/pypa/hatchFeatures
--------* Works on `redis-py `_
* Queue based on
`RPUSH `_,
`BLPOP `_,
`LLEN `_,
`LRANGE `_* ZQueue based on
`ZADD `_,
`ZRANGE `_,
`ZCARD `_,
`ZREM `_,
`EVAL `_* TimestampZQueue based ZQueue
* Storage based on
`SET `_,
`GET `_* HashStorage based on
`HSET `_,
`HGET `_,
`HDEL `_,
`HMSET `_,
`HMGET `_,
`HGETALL `_* HyperLogLogStorage based on
`PFADD `_,
`PFMERGE `_,
`PFCOUNT `_Usage
-----Add this to aioworkers config.yaml:
.. code-block:: 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: queueYou can work with redis queue like this:
.. code-block:: python
await context.queue.put({'a': 1})
d = await context.queue.get()Development
-----------Check code:
.. code-block:: shell
hatch run lint:all
Format code:
.. code-block:: shell
hatch run lint:fmt
Run tests:
.. code-block:: shell
hatch run pytest
Run tests with coverage:
.. code-block:: shell
hatch run cov