Running Tasks Concurrently in Django Asynchronous Views
Mariusz Felisiak, a Django and Python contributor, explores how to use recent async improvements in Django to run multiple async tasks in an asynchronous view. Since Django 3.0 with the addition of ASGI support (Asynchronous Server Gateway Interface), there has been a steady march of improvements that bring Django closer to having a full asynchronous request-response cycle. Now, we're at the point where interesting things are possible for "normal web apps." This article covers how to write an asynchronous view in Django and provides examples of using async ORM operations and calling external APIs. It also discusses deploying Django projects with ASGI servers like Daphne, Hypercorn, and Uvicorn.
Company
Fly.io
Date published
April 13, 2023
Author(s)
Mariusz Felisiak
Word count
1684
Language
English
Hacker News points
2