
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
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://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/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://pypistats.org/packages/aioworkers-redis
.. image:: https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg :alt: Hatch project :target: https://github.com/pypa/hatch
Works on redis-py <https://pypi.org/project/redis/>
_
Queue based on
RPUSH <https://redis.io/commands/rpush>
,
BLPOP <https://redis.io/commands/blpop>
,
LPOP <https://redis.io/commands/lpop>
,
LLEN <https://redis.io/commands/llen>
,
LRANGE <https://redis.io/commands/lrange>
_
ZQueue based on
ZADD <https://redis.io/commands/zadd>
,
ZRANGE <https://redis.io/commands/zrange>
,
ZCARD <https://redis.io/commands/zcard>
,
ZREM <https://redis.io/commands/zrem>
,
EVAL <https://redis.io/commands/eval>
_
TimestampZQueue based ZQueue
Storage based on
SET <https://redis.io/commands/set>
,
GET <https://redis.io/commands/get>
HashStorage based on
HSET <https://redis.io/commands/hset>
,
HGET <https://redis.io/commands/hget>
,
HDEL <https://redis.io/commands/hdel>
,
HMSET <https://redis.io/commands/hmset>
,
HMGET <https://redis.io/commands/hmget>
,
HGETALL <https://redis.io/commands/hgetall>
HyperLogLogStorage based on
PFADD <https://redis.io/commands/pfadd>
,
PFMERGE <https://redis.io/commands/pfmerge>
,
PFCOUNT <https://redis.io/commands/pfcount>
_
XQueue based on
XADD <https://redis.io/commands/xadd>
,
XREADGROUP <https://redis.io/commands/xreadgroup>
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: queue
You can work with redis queue like this:
.. code-block:: python
await context.queue.put({'a': 1})
d = await context.queue.get()
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
FAQs
Module for working with redis
We found that aioworkers-redis demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.