summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinicius Monego <monego@posteo.net>2025-07-26 07:41:57 -0300
committerVinicius Monego <monego@posteo.net>2025-07-26 20:55:56 -0300
commit6768e33bcc2bec5f2f64d1f8f094a5ed9aa39512 (patch)
tree8a34cf266963f9e9ca788c97193af4a38b0fde58
parent186773ab2af995a1c7c71bcba4b91880329e5009 (diff)
gnu: Add python-channels.
* gnu/packages/django.scm (python-channels): New variable. Change-Id: I71a266adfb20d9ea8b8f3000bb9c62ae4d1290c0
-rw-r--r--gnu/packages/django.scm38
1 files changed, 38 insertions, 0 deletions
diff --git a/gnu/packages/django.scm b/gnu/packages/django.scm
index 283df2bd69..4d428d4686 100644
--- a/gnu/packages/django.scm
+++ b/gnu/packages/django.scm
@@ -99,6 +99,44 @@ It supports automatic negotiation of protocols; there's no need for URL
prefixing to determine WebSocket endpoints versus HTTP endpoints.")
(license license:bsd-3)))
+(define-public python-channels
+ (package
+ (name "python-channels")
+ (version "4.2.2")
+ (source
+ (origin
+ (method git-fetch) ; no tests in PyPI
+ (uri (git-reference
+ (url "https://github.com/django/channels")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0x7w29qpj2acrzf8hcgymsyr5gk3aj2wkbvlwcr01ygd6as8h7hz"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-asgiref python-django))
+ ;; Channels develops and maintains Daphne but any other ASGI server can be
+ ;; used, so keep it in native-inputs for tests.
+ (native-inputs (list daphne
+ python-async-timeout
+ python-pytest
+ python-pytest-asyncio
+ python-pytest-django
+ python-setuptools
+ python-wheel))
+ (home-page "https://github.com/django/channels")
+ (synopsis "Async, event-driven capabilities on Django")
+ (description
+ "Channels wraps Django's native asynchronous view support, allowing Django
+projects to handle not only HTTP, but protocols that require long-running
+connections too - WebSockets, MQTT, chatbots, amateur radio, and more. It does
+this while preserving Django's synchronous nature, allowing you to choose how
+you write your code - synchronous, fully asynchronous, or a mixture of both.
+
+Channels also bundles this event-driven architecture with @emph{channel layers},
+a system that allows you to easily communicate between processes, and separate
+your project into different processes.")
+ (license license:bsd-3)))
+
(define-public python-django-4.2
(package
(name "python-django")