Skip to main content

Redis support for eric-sse

Installation

pip install eric-redis-queues

Usage

from redis import Redis
from eric_sse.prefabs import SSEChannel
from eric_redis_queues.repository import redis_channel_repository_builder

# Any redis-py client, configured as the application needs (credentials, TLS, pool, ...), without decode_responses
client = Redis(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, client).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.
  • RedisConnection is removed: RedisStorage, RedisQueue, RedisQueueRepository and redis_channel_repository_builder take a redis.Redis client.
  • 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.0.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.0.0
File Size Uploaded Provenance Actions
eric_redis_queues-3.0.0.tar.gz 4.8 kB Without provenance Details for eric_redis_queues-3.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 10.9 kB

Release files / eric_redis_queues-3.0.0.tar.gz

Download URL eric_redis_queues-3.0.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e331bf15aa7119553867dc037e10dcea5ebb1653e627f4ea7264311726073ef9
BLAKE2b-256 checksum
How to use checksums
72de83fa77ac24df7f4acacb8f79c367afc6d92ddccdb9dddab16746541f8b7b
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.0.0-py3-none-any.whl

Download URL eric_redis_queues-3.0.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e72f87973a22e3e21f3b03de9c80b667544bff8c2a2dd8aabe1544a09af8a625
BLAKE2b-256 checksum
How to use checksums
f947bb901cc500e8289b7a7e9d3ea21915e81eec2986d90cec74d89761275180
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.0.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.0.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