Skip to main content

Redis-backed ASGI channel layer implementation

Project description

https://api.travis-ci.org/andrewgodwin/asgi_redis.svg https://img.shields.io/pypi/v/asgi_redis.svg

An ASGI channel layer that uses Redis as its backing store, and supports both a single-server and sharded configurations, as well as group support.

Usage

You’ll need to instantiate the channel layer with connection details, which include:

  • hosts: The server(s) to connect to, as either URIs or (host, port) tuples. Defaults to ['localhost', 6379]. Pass multiple hosts to enable sharding, but note that changing host list will lose most sharded data.

  • prefix: Prefix to add to all Redis keys. Defaults to asgi:.

  • expiry: Message expiry in seconds. Defaults to 60.

Example:

channel_layer = RedisChannelLayer(
    host="redis",
    db=4,
)

TODO

  • Expire/clean out groups

  • Prune channel lists on write/periodically as well as on read

  • Efficient send_group implementation with Lua

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asgi_redis-0.11.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

asgi_redis-0.11.0-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file asgi_redis-0.11.0.tar.gz.

File metadata

File hashes

Hashes for asgi_redis-0.11.0.tar.gz
Algorithm Hash digest
SHA256 f98245534e6d4f8d74c096c29481613305a99c197c100c66513e31da5d8d97b3
MD5 e71e0084d945046d02becc0d6899a004
BLAKE2b-256 c2c59889f43bc17d0f602031ebd8066320ca6a7fa443fb8e65d3284699944d60

See more details on using hashes here.

File details

Details for the file asgi_redis-0.11.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for asgi_redis-0.11.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b1dbbbe07bd1066bf506c2115f9241b458bb4a4d69ac0c5ae4dc82d7379c91d4
MD5 5164d065479a5ac5e9d8cffba54e43f5
BLAKE2b-256 4d0303d0a50a1b08b2228c71673f92520dba00da52dad9d133ff5dac138ce146

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page