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 list key used as the queue.
    """

    key: str
    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())

Semantics

  • A Redis list is the queue: producers RPUSH to the right, the consumer LPOPs from the left — FIFO.
  • get_messages pops up to max_chunk_size items in one LPOP key count call.
  • There are no consumer groups / acks (that would be Redis Streams); romeways' own resend-on-error (ResendException) re-pushes the message to the same list, 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.0

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.0
File Size Uploaded Provenance Actions
romeways_redis_queue-0.1.0.tar.gz 4.1 kB With provenance Details for romeways_redis_queue-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 9.4 kB

Release files / romeways_redis_queue-0.1.0.tar.gz

Download URL romeways_redis_queue-0.1.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f2890c79b71220ddf76d25f6d07974609445a3fe766f175b17d220f186940fbd
BLAKE2b-256 checksum
How to use checksums
01d7a29edfebd487b601194ce4e04e8532b24869adecc8c9de7aff06906180a3
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.0-py3-none-any.whl

Download URL romeways_redis_queue-0.1.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6641eac435bbd44e53d1b816fb603f6460166475f5c6e482529bfa4822160445
BLAKE2b-256 checksum
How to use checksums
b1d2eb464ffa71c08c645d7596ca04ab056d81fbe59ed85d492989f66f17adda
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.0

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.0.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.0 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