Skip to main content

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

  1. Install virgodev_websocket_support

    pip install virgodev_websocket_support
    
  2. 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",
        ...
    )
    
  3. 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
    
  4. 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

Metadata

Release files for virgodev-websocket-support 0.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 virgodev-websocket-support 0.1.0
File Size Uploaded Provenance Actions
virgodev_websocket_support-0.1.0.tar.gz 3.3 kB Without provenance Details for virgodev_websocket_support-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for virgodev-websocket-support 0.1.0
File Interpreter ABI Platform Actions
virgodev_websocket_support-0.1.0-py3-none-any.whl Python 3 none any Details for virgodev_websocket_support-0.1.0-py3-none-any.whl

Total release size: 8.1 kB

Release files / virgodev_websocket_support-0.1.0.tar.gz

Download URL virgodev_websocket_support-0.1.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b176f264585c3bb9e8ec7769f1afdae7b7050439fcb19d48f1eadfe4dc10b485
BLAKE2b-256 checksum
How to use checksums
80d5aa6ab31bf0f73a19702a1b4161ec73d7933d8ecf89f491f484f69b277e97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.6 Linux/6.5.0-5-generic

Release files / virgodev_websocket_support-0.1.0-py3-none-any.whl

Download URL virgodev_websocket_support-0.1.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a2939e47af4fd2fbd204fd372fc1b771686091db06d4097aa9ac36867e91355
BLAKE2b-256 checksum
How to use checksums
cdf4c6e548df1f8da3d51fd42b3f64752242b29cbd94ac16644073b405b797f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.11.6 Linux/6.5.0-5-generic

Security for virgodev-websocket-support 0.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

0.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