Channels is a project that takes Django and extends its abilities beyond HTTP - to handle WebSockets, chat protocols, IoT protocols, and more.
It does this by taking the core of Django and layering a fully asynchronous layer underneath, running Django itself in a synchronous mode but handling connections and sockets asynchronously, and giving you the choice to write in either style.
To get started understanding how Channels works, read our Introduction, which will walk through how things work. If you’re upgrading from Channels 1, take a look at What’s new in Channels 2? to get an overview of the changes; things are substantially different.
If you would like complete code examples to read alongside the documentation or experiment on, the channels-examples repository contains well-commented example Channels projects.
This is documentation for the 2.x series of Channels. If you are looking
for documentation for the legacy Channels 1, you can select
1.x from the
versions selector in the bottom-left corner.
Channels is comprised of several packages:
- Channels, the Django integration layer
- Daphne, the HTTP and Websocket termination server
- asgiref, the base ASGI library
- channels_redis, the Redis channel layer backend (optional)
This documentation covers the system as a whole; individual release notes and instructions can be found in the individual repositories.
- Database Access
- Channel Layers
- Worker and Background Tasks
- What’s new in Channels 2?
- Channels WebSocket wrapper
- Channel Layer Specification
- Community Projects
- Release Notes
- 1.0.0 Release Notes
- 1.0.1 Release Notes
- 1.0.2 Release Notes
- 1.0.3 Release Notes
- 1.1.0 Release Notes
- 1.1.1 Release Notes
- 1.1.2 Release Notes
- 1.1.3 Release Notes
- 1.1.4 Release Notes
- 1.1.5 Release Notes
- 1.1.6 Release Notes
- 2.0.0 Release Notes
- 2.0.1 Release Notes
- 2.0.2 Release Notes
- 2.1.0 Release Notes
- 2.1.1 Release Notes