{"id":17874045,"url":"https://github.com/devkral/channels-multiprocessing","last_synced_at":"2025-04-03T00:12:29.125Z","repository":{"id":65761465,"uuid":"583788579","full_name":"devkral/channels-multiprocessing","owner":"devkral","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-27T12:40:20.000Z","size":65,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-09T12:18:50.528Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devkral.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-30T23:22:36.000Z","updated_at":"2022-12-30T23:24:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"31a2c3fe-df5b-45c5-ad87-3ab85f97bd87","html_url":"https://github.com/devkral/channels-multiprocessing","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"ca91f2e5f766e41d4a8e4b34b97d84abd7afeeb6"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkral%2Fchannels-multiprocessing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkral%2Fchannels-multiprocessing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkral%2Fchannels-multiprocessing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devkral%2Fchannels-multiprocessing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devkral","download_url":"https://codeload.github.com/devkral/channels-multiprocessing/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246911469,"owners_count":20853657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-28T11:07:26.619Z","updated_at":"2025-04-03T00:12:29.094Z","avatar_url":"https://github.com/devkral.png","language":"Python","readme":"# Rational\n\nKeep thinks simple and stupid.\n\nAdding a redis service makes thinks more complicated\n\nThis is a try to use plain python utilities to provide channels layer functionality without configuration\n\n# idea\n\nwe leverage multiprocessing for providing a channel layer. As multiprocessing doesn't play always nice with async\nwe use a per layer a Thread to serialize the internal requests.\nPer default the default mp_context is used for creating the manager for multiprocessing synchronization\nIt may be set manually to \"spawn\" in case of an non python asgi server with multiple process workers\n\n# Usage\n\n```python\nCHANNEL_LAYERS = {\n\"default\": {\n        \"BACKEND\": \"channels_multiprocessing.MultiprocessingChannelLayer\"\n    }\n}\n```\n\nwith explicit context\n\n```python\nCHANNEL_LAYERS = {\n\"default\": {\n        \"BACKEND\": \"channels_multiprocessing.MultiprocessingChannelLayer\",\n        \"CONFIG\": {\n            \"mp_context\": \"spawn\",\n        },\n    }\n}\n```\n\nNote: all options of BaseLayer are supported (e.g. capacity)\n\n# State\n\ntests passed\n\n# TODO\n\n-   documentation\n-   investigate aioprocessing\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevkral%2Fchannels-multiprocessing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevkral%2Fchannels-multiprocessing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevkral%2Fchannels-multiprocessing/lists"}