awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
django avatar

django/channels

0
View on GitHub↗
6,352 星标·828 分支·Python·BSD-3-Clause·7 次浏览channels.readthedocs.io↗

Channels

Channels is an extension for the Django web framework that adds native support for WebSockets, background tasks, and long-running connections alongside standard HTTP requests. It provides a channel layer abstraction for passing messages between different parts of a Django application across processes, along with a protocol router that inspects incoming connections and dispatches them to the correct handler for HTTP, WebSocket, or custom protocols.

The project introduces an async consumer abstraction that wraps protocol-specific handling into a single callable, and a background worker pool that runs consumer instances in separate processes to process channel layer messages outside the request-response cycle. It includes a channel layer backend with a generic publish-subscribe interface backed by Redis or in-memory stores, and a test client simulator that emulates a full ASGI stack for testing virtual HTTP and WebSocket connections without a real server.

Channels handles WebSocket connection management, long-poll HTTP requests, and non-HTTP protocol connections through a protocol type router. It supports real-time client updates, multi-user chat room management, and cross-process communication for building live features like chat and notifications. The project also provides WebSocket user authentication and testing utilities for verifying consumer behavior in automated test suites.

The documentation covers installation, setup, and usage patterns for integrating these capabilities into a Django project.

Features

  • Real-Time Extensions - An extension for Django that adds native support for WebSockets, background tasks, and long-running connections alongside HTTP.
  • ASGI Servers - Implements the ASGI interface to handle low-level network I/O and lifecycle events for all connection types.
  • Django Channel Workers - An abstraction for passing messages between different parts of a Django application across processes.
  • WebSocket Push Updates - Sends live data from the server to connected browsers over WebSockets to display new events without polling.
  • Redis-Backed Pub-Sub Layers - Provides a generic publish-subscribe interface backed by Redis or in-memory stores for cross-process message passing.
  • Websocket Connection Managers - Manages persistent bidirectional WebSocket connections alongside standard HTTP requests in a single application.
  • HTTP/2 and WebSocket Servers - Terminates both HTTP and WebSocket connections with a dedicated server that handles low-level network protocols.
  • Multi-Protocol Handshake Routers - Inspects the connection's initial handshake and routes it to the correct consumer class for HTTP, WebSocket, or custom protocols.
  • Application-Level Protocol Routers - Inspects incoming connections and dispatches them to the correct handler for HTTP, WebSocket, or custom protocols.
  • WebSocket Authentication and Testing - Verifies user identity on WebSocket connections and simulates real-time connections in automated tests.
  • WebSocket Authentications - Verifies the identity of a user on a WebSocket connection using the existing authentication system.
  • WebSocket Extensions - Adds native WebSocket support to Django for real-time features like chat and notifications.
  • Protocol-Specific Dispatchers - Wraps protocol-specific handling into a single async callable that dispatches events to user-defined methods.
  • Async Task Processors - Processes background tasks and long-poll HTTP requests in an asynchronous style within a Django project.
  • Background Task Execution - Runs asynchronous tasks outside the request-response cycle using a dedicated worker process.
  • Multi-User Chat Room Managers - Builds chat rooms where multiple participants exchange messages that appear instantly for all connected users.
  • Cross-Process Message Routing - Sends messages between different parts of an application using a channel layer to enable real-time features like chat and notifications.
  • Django Channel Layer Bridges - Passes messages between different parts of a Django application across processes to enable real-time coordination.
  • Non-HTTP Protocol Acceptors - Accepts and processes connections using protocols other than HTTP within a single application.
  • Connection Simulators - Simulates WebSocket and HTTP connections in tests to verify how consumers and handlers behave.
  • Arbitrary Protocol Handlers - Provides a flexible layer for handling arbitrary network protocols beyond HTTP and WebSocket.
  • Background Task Offloading - Moves long-running work outside the request-response cycle so the HTTP layer stays responsive.
  • ASGI Stack Simulators - Emulates a full ASGI stack in tests to send and receive messages over virtual HTTP and WebSocket connections.
  • Background Processing Workers - Runs consumer instances in separate processes to process channel layer messages outside the request-response cycle.
  • Channel-Based Workers - Runs long-running or periodic work outside the request-response cycle using a channel layer and worker processes.
  • Real-Time Group Messaging - Creates a multi-user chat room where participants can send messages and see others' messages appear immediately.
  • Testing Utilities - Verifies that asynchronous WebSocket handlers behave correctly using automated test utilities.
  • Async and Real-time - Native asynchronous support and WebSocket handling.
  • Websockets - Listed in the “Websockets” section of the Awesome Python awesome list.
  • WebSocket - Developer-friendly asynchrony for Django.
  • WebSocket Tools - Asynchronous tools for Django.

Star 历史

django/channels 的 Star 历史图表django/channels 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

Channels 的开源替代方案

相似的开源项目,按与 Channels 的功能重合度排序。
  • partykit/partykitpartykit 的头像

    partykit/partykit

    5,644在 GitHub 上查看↗

    PartyKit is a serverless WebSocket backend platform for building real-time multiplayer applications. It provides a globally distributed edge computing runtime that runs stateful server code close to users, with automatic scaling and hibernation for idle rooms. The platform handles WebSocket connections, HTTP requests, and durable storage without requiring infrastructure management, and includes a client and server SDK with hooks, storage, and Yjs integration for building collaborative features. The platform distinguishes itself through per-room isolation using Durable Objects, where each uniq

    TypeScriptbackendscollaborationcrdts
    在 GitHub 上查看↗5,644
  • python-websockets/websocketspython-websockets 的头像

    python-websockets/websockets

    5,692在 GitHub 上查看↗

    websockets is a Python library that provides both client and server implementations for the WebSocket protocol, enabling real-time, bidirectional communication between applications. At its core, it offers the fundamental primitives for establishing persistent connections, managing their lifecycles, and exchanging text or binary messages asynchronously using coroutines. The library distinguishes itself through comprehensive support for various messaging patterns, including broadcast messaging to all connected clients, targeted messaging to specific clients, and shared application state synchro

    Pythonpythonpython3websocket
    在 GitHub 上查看↗5,692
  • crossbario/autobahn-pythoncrossbario 的头像

    crossbario/autobahn-python

    2,538在 GitHub 上查看↗

    WebSocket and WAMP in Python for Twisted and asyncio

    Pythonautobahnpubsubpython
    在 GitHub 上查看↗2,538
  • boostorg/beastboostorg 的头像

    boostorg/beast

    4,801在 GitHub 上查看↗

    Beast is a C++ library for implementing low-level HTTP and WebSocket clients and servers. It functions as an asynchronous networking framework designed to compose non-blocking I/O operations and layered stream stacks for managing concurrent network traffic, specifically utilizing the Boost.Asio asynchronous model. The library provides a comprehensive implementation of the HTTP/1.1 and WebSocket protocols. For HTTP, it includes primitives for parsing and serializing messages with support for chunked transfer encoding, incremental body reading, and request pipelining. Its WebSocket implementati

    C++asioasync-programmingboost
    在 GitHub 上查看↗4,801
查看 Channels 的所有 30 个替代方案→

常见问题解答

django/channels 是做什么的?

Channels is an extension for the Django web framework that adds native support for WebSockets, background tasks, and long-running connections alongside standard HTTP requests. It provides a channel layer abstraction for passing messages between different parts of a Django application across processes, along with a protocol router that inspects incoming connections and dispatches them to the correct handler for HTTP, WebSocket, or custom protocols.

django/channels 的主要功能有哪些?

django/channels 的主要功能包括:Real-Time Extensions, ASGI Servers, Django Channel Workers, WebSocket Push Updates, Redis-Backed Pub-Sub Layers, Websocket Connection Managers, HTTP/2 and WebSocket Servers, Multi-Protocol Handshake Routers。

django/channels 有哪些开源替代品?

django/channels 的开源替代品包括: partykit/partykit — PartyKit is a serverless WebSocket backend platform for building real-time multiplayer applications. It provides a… python-websockets/websockets — websockets is a Python library that provides both client and server implementations for the WebSocket protocol,… crossbario/autobahn-python — WebSocket and WAMP in Python for Twisted and asyncio. boostorg/beast — Beast is a C++ library for implementing low-level HTTP and WebSocket clients and servers. It functions as an… uwebsockets/uwebsockets — uWebSockets is a C++ networking framework that serves as a high-performance WebSocket server library, HTTP web server,… digitallyinduced/ihp — ihp is a type-safe web framework and full-stack application orchestrator designed for PostgreSQL. It functions as a…