# Django Channels

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!

## Projects

Channels is comprised of six 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_rabbitmq, the RabbitMQ 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.

## Topics

- In Short
  - What is Channels?
  - How?
  - I have to change how I run Django?
  - What else does Channels give me?
  - Does it scale?
  - Why doesn’t it use my favourite message queue?
  - Do I need to worry about making all my code async-friendly?
  - What version of Django does it work with?
  - Official project
  - What do I read next?
- Channels Concepts
  - What is a channel?
  - How do we use channels?
  - Channel Types
  - Groups
  - Next Steps
- Installation
  - Installing the latest development version
- Getting Started with Channels
  - First Consumers
  - Groups
  - Running with Channels
  - Persisting Data
  - Authentication
  - Security
  - Routing
  - Models
  - Enforcing Ordering
  - Next Steps
- Deploying
  - Setting up a channel backend
  - Run worker servers
  - Run interface servers
  - Deploying new versions of code
  - Running just ASGI
  - Running ASGI alongside WSGI
  - Running on a PaaS
  - Scaling Up
- Generic Consumers
  - Base
  - WebSockets
  - WebSocket Multiplexing
  - Sessions and Users
  - Applying Decorators
  - As route
- Routing
  - Filters
- Data Binding
  - What does data binding allow?
  - Getting Started
  - Frontend Considerations
  - Custom Serialization/Protocols
  - Dealing with Disconnection
- Channels WebSocket wrapper
- Channel Layer Types
  - Redis
  - RabbitMQ
  - IPC
  - In-memory
  - Writing Custom Channel Layers
- Delay Server
  - Getting Started with Delay
  - Delaying Messages
- Testing Consumers
  - ChannelTestCase
  - Generic Consumers
  - Groups
  - Clients
  - Applying routes
  - Test Data binding with `WSClient`
  - Multiple Channel Layers
  - Live Server Test Case
- Reference
  - Consumers
  - Message
  - Channel
  - Group
  - Channel Layer
  - AsgiRequest
  - AsgiHandler
  - Decorators
- 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
  - Abstract
  - Rationale
  - Overview
  - Specification Details
  - Common Questions
  - Copyright
- Community Projects
- Contributing
  - What can I work on?
  - I’m a novice contributor/developer - can I help?
  - Can you pay me for my time?
- 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
  - 1.1.7 Release Notes
  - 1.1.8 Release Notes