Skip to main content

Rational

Keep thinks simple and stupid.

Adding a redis service makes thinks more complicated

This is a try to use plain python utilities to provide channels layer functionality without configuration

idea

we leverage multiprocessing for providing a channel layer. As multiprocessing doesn't play always nice with async we use a per layer a Thread to serialize the internal requests. Per default the default mp_context is used for creating the manager for multiprocessing synchronization It may be set manually to "spawn" in case of an non python asgi server with multiple process workers

Usage

CHANNEL_LAYERS = {
"default": {
        "BACKEND": "channels_multiprocessing.MultiprocessingChannelLayer"
    }
}

with explicit context

CHANNEL_LAYERS = {
"default": {
        "BACKEND": "channels_multiprocessing.MultiprocessingChannelLayer",
        "CONFIG": {
            "mp_context": "spawn",
        },
    }
}

Note: all options of BaseLayer are supported (e.g. capacity)

State

tests passed

TODO

  • documentation
  • investigate aioprocessing

Metadata

Release files for channels-multiprocessing 0.1.2

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-multiprocessing 0.1.2
File Size Uploaded
channels_multiprocessing-0.1.2.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for channels-multiprocessing 0.1.2
File Interpreter ABI Platform
channels_multiprocessing-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / channels_multiprocessing-0.1.2.tar.gz

Download URL channels_multiprocessing-0.1.2.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e7d8936d111c71af80f4bd87ee45438cb78d8a3364b2f059cffb9e2dd4f728b8
BLAKE2b-256 checksum
How to use checksums
b3f2be0c59119a64ed47bfe3bc55e2eda973e8b84e731b6bb976851187306b97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.9 Linux/6.1.11-arch1-1

Release files / channels_multiprocessing-0.1.2-py3-none-any.whl

Download URL channels_multiprocessing-0.1.2-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90eac73d8525058bddc01f58652bc4ff58e98dfb0f837046d1c2f64019656208
BLAKE2b-256 checksum
How to use checksums
4c32bc52fc0418c9d392c9e6c7b836cd1ba6c7fe056a1bc103dcd181e77813c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.9 Linux/6.1.11-arch1-1

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1

2 release files

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