Channels is a project to make Django able to handle more than just plain HTTP requests, including WebSockets and HTTP2, as well as the ability to run code after a response has been sent for things like thumbnailing or background calculation.
It’s an easy-to-understand extension of the Django view model, and easy to integrate and deploy.
First, read our Channels Concepts documentation to get an idea of the data model underlying Channels and how they’re used inside Django.
Then, read Getting Started with Channels to see how to get up and running with WebSockets with only 30 lines of code.
If you want a quick overview, start with In Short.
If you are interested in contributing, please read our Contributing docs!
Channels is comprised of five packages:
- Channels, the Django integration layer
- Daphne, the HTTP and Websocket termination server
- asgiref, the base ASGI library/memory backend
- asgi_redis, the Redis channel backend
- asgi_ipc, the POSIX IPC channel backend
This documentation covers the system as a whole; individual release notes and instructions can be found in the individual repositories.
- In Short
- Channels Concepts
- Getting Started with Channels
- Generic Consumers
- Data Binding
- Channel Layer Types
- Testing Consumers
- Frequently Asked Questions
- Why are you doing this rather than just using Tornado/gevent/asyncio/etc.?
- Why aren’t you using node/go/etc. to proxy to Django?
- Why isn’t there guaranteed delivery/a retry mechanism?
- Can I run HTTP requests/service calls/etc. in parallel from Django without blocking?
- How do I associate data with incoming connections?
- How do I talk to Channels from my non-Django application?
- Are channels Python 2, 3 or 2+3?
- Why isn’t there support for socket.io/SockJS/long poll fallback?
- ASGI (Asynchronous Server Gateway Interface) Draft Spec
- Community Projects