This repository contains full code examples for the book "Async Patterns in Django".
Purchase the book at: www.asyncdjango.com
Note, the included Docker Compose files work with Docker Engine or Docker Desktop CLI.
# Enter project directory
cd <project-directory>
# Build container
docker compose build --build-arg userid=$(id -u) --build-arg groupid=$(id -g)
# Enter container
docker compose run -P django /bin/bash
# Install Django and other dependencies
pdm install
pdm manage migrate
# Run the fullstack
pdm run honcho start
- Celery Weather
Description: Implementation of Celery for fetching weather forecasts asynchronously. Implemented with a RabbitMQ broker and a Redis broker.
Project: celery-weather-rabbitmq
Project: celery-weather-redis - Django Channel Weather
Description: Weather application using Django Channels and WebSockets.
Project: channel-weather - File Streamer
Description: Large file streaming application using asynchronousStreamingHttpResponse
. Implements HTTP Range Requests.
Project: file-streamer - GraphQL Subscription Weather
Description: Weather application using Graphene and GraphQL Subscriptions over a WebSocket.
Project: gql-weather - Long Polling Weather
Description: Weather application that uses Long Polling.
Project: long-weather - Pusher Weather
Description: Weather application that uses the Pusher Service.
Project: pusher-weather - SSE Weather
Description: Weather application that uses Server Sent Events.
Project: sse-weather - WebSocket Weather
Description: Weather application using WebSockets.
Project: websocket-weather