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.
You can find the Channels repository on GitHub.
- 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