Skip to main content

Redis support for eric-sse

Installation

pip install eric-redis-queues

Usage

from eric_sse.prefabs import SSEChannel
from eric_redis_queues import RedisConnection
from eric_redis_queues.repository import redis_channel_repository_builder

redis_connection = RedisConnection(host='127.0.0.1', port=6379, db=0)

# Channels, connections, listeners and queues persisted in Redis; messages kept in Redis lists
repository = redis_channel_repository_builder(SSEChannel, redis_connection).build()

The returned builder is an eric-sse ChannelRepositoryBuilder, so it can be further configured (listeners, error handlers) before build().

Migrating from 2.x

  • RedisConnectionRepository, RedisSSEChannelRepository, RedisListenerRepository and the connection factories are replaced by redis_channel_repository_builder.
  • BlockingRedisQueue and RedisSSEChannelBlockingQueuesRepository are removed: in eric-sse 3 waiting is up to the caller, e.g. await channel.wait_next(connection_id, timeout). See the changelog for why, and how to get the same behaviour.
  • RedisStorage(redis_connection, prefix): arguments swapped, and prefix has a default.
  • Keys layout changed: data persisted by 2.x is not readable by 3.x.

Tests

Integration tests run eric-sse contracts against a real Redis. Only eric-redis-queues:* keys are deleted.

REDIS_HOST=127.0.0.1 REDIS_PORT=6379 REDIS_DB=15 python -m pytest tests

Tests are skipped if Redis is not reachable.

Related packages

Documentation: https://laxertu.github.io/eric-redis-queues/

Metadata

Release files for eric-redis-queues 3.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 eric-redis-queues 3.1.0
File Size Uploaded Provenance Actions
eric_redis_queues-3.1.0.tar.gz 5.1 kB Without provenance Details for eric_redis_queues-3.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for eric-redis-queues 3.1.0
File Interpreter ABI Platform Actions
eric_redis_queues-3.1.0-py3-none-any.whl Python 3 none any Details for eric_redis_queues-3.1.0-py3-none-any.whl

Total release size: 11.3 kB

Release files / eric_redis_queues-3.1.0.tar.gz

Download URL eric_redis_queues-3.1.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
20c00f0ad32ca7608ce0175285112f05e71b4175e00f717acd7301702463082e
BLAKE2b-256 checksum
How to use checksums
935e508052f39c3f5e6d895ebab644fc620e3507fcdc3fbf03a8f22b9965e622
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.10.12 Linux/6.8.0-149-generic

Release files / eric_redis_queues-3.1.0-py3-none-any.whl

Download URL eric_redis_queues-3.1.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80c696dca1dd744678ea8c0df8706555ae1efd8f703d0ba7d26545e7af383b6e
BLAKE2b-256 checksum
How to use checksums
e0ca707cca7b124e0a1b797298aabcb626ade94ce32c34b85b8932ba9bc6b6e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.0.1 CPython/3.10.12 Linux/6.8.0-149-generic

Security for eric-redis-queues 3.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

3.1.0 This release

2 release files No 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