Skip to main content

Romeways Redis / KeyDB

This is an extra package for romeways — for more details access the romeways Github page.

This package uses redis-py and a Redis list as a FIFO queue (RPUSH to send, LPOP to consume). KeyDB is a drop-in Redis replacement, so the same connector works against either. Requires a server with LPOP key count support (Redis >= 6.2, KeyDB).

Configs

Queue

from dataclasses import dataclass

from romeways import GenericQueueConfig


@dataclass(slots=True, frozen=True)
class RedisQueueConfig(GenericQueueConfig):
    """
    key: str Redis / KeyDB key — a list (mode="list") or a stream (mode="streams").
    mode: "list" | "streams" Backend data structure. Default "list".
    group / consumer: str Consumer group / consumer name (streams mode only).
    """

    key: str
    mode: str = "list"        # "list" or "streams"
    group: str = "romeways"   # streams only
    consumer: str = "romeways"  # streams only
    connector_name: str
    frequency: float
    max_chunk_size: int
    sequential: bool
    retries: int

Connector

from dataclasses import dataclass

from romeways import GenericConnectorConfig


@dataclass(slots=True, frozen=True)
class RedisConnectorConfig(GenericConnectorConfig):
    """
    url: str Redis / KeyDB connection URL, e.g. "redis://localhost:6379/0".
    """

    url: str = "redis://localhost:6379/0"

Use case

import asyncio

import romeways

# Create a queue config
config_q = romeways.RedisQueueConfig(
    key="queue.payment.done",
    connector_name="redis-dev1",
    frequency=1,
    max_chunk_size=10,
    sequential=False,
    retries=3,
)


# Register a controller/consumer for the queue name
@romeways.queue_consumer(queue_name="queue.payment.done", config=config_q)
async def controller(message: romeways.Message):
    print(message)


config_p = romeways.RedisConnectorConfig(
    connector_name="redis-dev1",
    url="redis://localhost:6379/0",
)

# Register a connector
romeways.connector_register(
    connector=romeways.RedisQueueConnector, config=config_p, spawn_process=False
)

asyncio.run(romeways.start())

Backends (mode)

  • list (default): a Redis list — producers RPUSH to the right, the consumer LPOP key counts from the left (FIFO, no acks). Requires Redis >= 6.2 / KeyDB.
  • streams: a Redis stream with a consumer group — XADD to send, XREADGROUP + XACK to consume. Gives consumer groups and redelivery of unacked entries. Set group/consumer.

Both backends were tested against a real Redis server (throughput + resend).

Notes

  • romeways' own resend-on-error (ResendException) re-sends the message to the same key, honouring the queue's retries.
  • Use spawn_process=False: the Redis connection is created in on_start on the running loop.

Metadata

Release files for romeways-redis-queue 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for romeways-redis-queue 0.1.1
File Size Uploaded Provenance Actions
romeways_redis_queue-0.1.1.tar.gz 4.9 kB With provenance Details for romeways_redis_queue-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for romeways-redis-queue 0.1.1
File Interpreter ABI Platform Actions
romeways_redis_queue-0.1.1-py3-none-any.whl Python 3 none any Details for romeways_redis_queue-0.1.1-py3-none-any.whl

Total release size: 11.1 kB

Release files / romeways_redis_queue-0.1.1.tar.gz

Download URL romeways_redis_queue-0.1.1.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1b0f1a5e19b282bc510631a7861e7566f5036e0c719fe4a6908e2df86fe6b0e5
BLAKE2b-256 checksum
How to use checksums
5e9af4c247c4b249ade69c05fbaefa51f7e7f13f2e1f51f86f48b97330906d79
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

Release files / romeways_redis_queue-0.1.1-py3-none-any.whl

Download URL romeways_redis_queue-0.1.1-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c43f031f1242e3474a43be3ff2efc705b81195851870ecaa21fd49cced71abc3
BLAKE2b-256 checksum
How to use checksums
082b0ab06248862f44a7f5b5277b728173023afa2cc04bd039220a6acdde7026
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

Security for romeways-redis-queue 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for romeways_redis_queue-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page