Skip to main content

Redis-backed ASGI channel layer implementation

Project description

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.10.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

asgi_redis-0.10.0-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: asgi_redis-0.10.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for asgi_redis-0.10.0.tar.gz
Algorithm Hash digest
SHA256 03f4c6abdb8525fdbfe2a41a454db53b37574d9621aa30b3e595189a70a44c49
MD5 0de71620ea98665922e03e3e69510a10
BLAKE2b-256 c091b1dd29ef462a8b8f55cff8ef320b04030d546541175371d618f0bec603fb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for asgi_redis-0.10.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 77d44cfc0c3e0cab5b3f4588f9127f90e6335d0600535d6fdda986ab53d59bf1
MD5 7be9af9bab54d5a399b9a43fdb1b55ea
BLAKE2b-256 2731e6dd797e6fbcea5e6f09ecb5ee560ac7a252daed1fae2905b0f39a74b4ba

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