Skip to main content

channels-extensions

PyPI - Version PyPI - Python Version


Installation

pip install channels-extensions

Usage

DummyChannelLayer

DummyChannelLayer is an noop (almost) implementation of BaseChannelLayer. Messages sent to it are never available, and receive never returns.

All methods work as checkpoints to the event loop, yielding control back to it at least once.

CHANNEL_LAYERS = {
    "dummy": {
        "BACKEND": "channels_extensions.layers.DummyChannelLayer",
    }
}

get_channel_layer

This is simply a version of channels get_channel_layer, but it raises an ImproperlyConfigured if the alias does not exist.

CurrentSiteMiddleware

A middleware that mimics django's CurrentSiteMiddleware. It adds a site key to the scope:

class EchoSiteConsumer(AsyncConsumer):
    async def websocket_connect(self, event):
        await self.send({
            "type": "websocket.accept",
        })

    async def websocket_receive(self, event):
        await self.send({
            "type": "websocket.send",
            "text": self.scope["site"],
        })

application = ProtocolTypeRouter({
    "websocket": AllowedHostsOriginValidator(
        AuthMiddlewareStack(
            CurrentSiteMiddleware(
                URLRouter([
                    path("echo/", EchoSiteConsumer.as_asgi()),
                ])
            )
        )
    ),
})

License

channels-extensions is distributed under the terms of the MIT license.

Metadata

Release files for channels-extensions 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for channels-extensions 0.0.1
File Size Uploaded Provenance Actions
channels_extensions-0.0.1.tar.gz 10.7 kB With provenance Details for channels_extensions-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for channels-extensions 0.0.1
File Interpreter ABI Platform Actions
channels_extensions-0.0.1-py3-none-any.whl Python 3 none any Details for channels_extensions-0.0.1-py3-none-any.whl

Total release size: 16.3 kB

Release files / channels_extensions-0.0.1.tar.gz

Download URL channels_extensions-0.0.1.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e5df0b3910468b41aab400e42627364d0553e7d5a5f97feba6c2cf31c38be921
BLAKE2b-256 checksum
How to use checksums
f138c98b8ce79233189156f3e4fd24f1326a50c22f9976215f3a229df61f92da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Release files / channels_extensions-0.0.1-py3-none-any.whl

Download URL channels_extensions-0.0.1-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9408fad5aaf7c00eea1370c82bd2807f79b285231826e65551fe65c16efd34f2
BLAKE2b-256 checksum
How to use checksums
30764b232e8ac18d91a381d517168bdfe3fc3e3e0bf19b641d1686df1d72e933
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

Security for channels-extensions 0.0.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for channels_extensions-0.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 28, 2026.

Transparency log

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.

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