No project description provided
Project description
Virgodev Websocket Support
provides a uniform system for sending and receiving websocket messages
specs
- documentation for connecting django-channels
- support functions for making django-channels easy
- signal for when a message is received
- create a function to send messages to a user
- create a function to send messages to a group
Get Started
-
Install virgodev_websocket_support
pip install virgodev_websocket_support
-
Add INSTALLED_APPS setting
INSTALLED_APPS = ( "daphne", # install at the top to convert `runserver` into a websocket client "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.sites", "virgodev_websocket_support", ... )
-
Add ASGI_APPLICATION setting
ASGI_APPLICATION = 'virgodev_websocket_support.asgi.application'
or use the asgi from your own application's asgi file
from virgodev_websocket_support.asgi import application as app application = app
-
Add CHANNEL_LAYERS setting
assign the host to the same redis instance as your cache
CHANNEL_LAYERS = { "default": { "BACKEND": "channels_redis.core.RedisChannelLayer", "CONFIG": { "hosts": [CACHES["default"]["LOCATION"]], "group_expiry": 60 * 10, }, }, }
Production
install and use uvicorn
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for virgodev_websocket_support-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b176f264585c3bb9e8ec7769f1afdae7b7050439fcb19d48f1eadfe4dc10b485 |
|
MD5 | 7998277cf3aed11ca893aac002c20ec7 |
|
BLAKE2b-256 | 80d5aa6ab31bf0f73a19702a1b4161ec73d7933d8ecf89f491f484f69b277e97 |
Close
Hashes for virgodev_websocket_support-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a2939e47af4fd2fbd204fd372fc1b771686091db06d4097aa9ac36867e91355 |
|
MD5 | e9d5086457ce1b27ff9ac68cc7561098 |
|
BLAKE2b-256 | cdf4c6e548df1f8da3d51fd42b3f64752242b29cbd94ac16644073b405b797f6 |