#556: Updates on Django's Async Story
For years, "Django and async" came with an asterisk. The docs themselves warned you off it. Scary performance notes, a story that felt half-finished. Well, that story just got rewritten, literally, and the person who rewrote it is here to tell you why the old framing was wrong.
Carlton Gibson is a former Django Fellow, sat on the security team for eight years, and he's on the steering council. On this episode we get into the async topic doc rewrite, what actually remains versus what was just fear, the new Tasks framework in 6.0, DB-level cascades and fetch modes landing in 6.1, and why free-threading is the bet that's about to pay off big for Django. If you've been told Django's async story isn't ready, this is the episode that puts that myth to bed.
Episode sponsors
Sentry Error Monitoring, Code talkpython26
Python in Production
Talk Python Courses
Links from the show
DjangoCon Europe: djangocon.eu
PyCon Italia: pycon.it
Django on the Med: djangomed.eu
Django Mantle: noumenal.es
PyPI: pypi.org
release notes: docs.djangoproject.com
on_delete: docs.djangoproject.com
Fetch modes: docs.djangoproject.com
HttpRequest.multipart_parser_class: docs.djangoproject.com
async topic doc: docs.djangoproject.com
docs: docs.djangoproject.com
DEP 14: github.com
django-tasks: github.com
django-tasks-local: github.com
Celery: docs.celeryq.dev
PEP 703: peps.python.org
free-threading HOWTO: docs.python.org
PEP 779: peps.python.org
ASGI: docs.djangoproject.com
PGBouncer: www.pgbouncer.org
Channels: channels.readthedocs.io
sync_to_async / async_to_sync: docs.djangoproject.com
noumenal.es: noumenal.es
Django Chat: djangochat.com
@carlton@fosstodon.org: fosstodon.org
Article: Cutting Python Web App Memory Over 31%: mkennedy.codes
Watch this episode on YouTube: youtube.com
Episode #556 deep-dive: talkpython.fm/556
Episode transcripts: talkpython.fm
Theme Song: Developer Rap
🥁 Served in a Flask 🎸: talkpython.fm/flasksong
---== Don't be a stranger ==---
YouTube: youtube.com/@talkpython
Bluesky: @talkpython.fm
Mastodon: @talkpython@fosstodon.org
X.com: @talkpython
Michael on Bluesky: @mkennedy.codes
Michael on Mastodon: @mkennedy@fosstodon.org
Michael on X.com: @mkennedy
#533: Web Frameworks in Prod by Their Creators
Today on Talk Python, the creators behind FastAPI, Flask, Django, Quart, and Litestar get practical about running apps based on their framework in production. Deployment patterns, async gotchas, servers, scaling, and the stuff you only learn at 2 a.m. when the pager goes off. For Django, we have Carlton Gibson and Jeff Triplet. For Flask, we have David Lord and Phil Jones, and on team Litestar we have Janek Nouvertné and Cody Fincher, and finally Sebastián Ramírez from FastAPI is here. Let’s jump in.
Episode sponsors
Talk Python Courses
Python in Production
Links from the show
Guests
David Lord
Janek Nouvertné
Cody Fincher
Philip Jones
Jeff Triplett
Carlton Gibson
Carlton Gibson - Django: github.com
Sebastian Ramirez - FastAPI: github.com
David Lord - Flask: davidism.com
Phil Jones - Flask and Quartz(async): pgjones.dev
Yanik Nouvertne - LiteStar: github.com
Cody Fincher - LiteStar: github.com
Jeff Triplett - Django: jefftriplett.com
Django: www.djangoproject.com
Flask: flask.palletsprojects.com
Quart: quart.palletsprojects.com
Litestar: litestar.dev
FastAPI: fastapi.tiangolo.com
Coolify: coolify.io
ASGI: asgi.readthedocs.io
WSGI (PEP 3333): peps.python.org
Granian: github.com
Hypercorn: github.com
uvicorn: uvicorn.dev
Gunicorn: gunicorn.org
Hypercorn: hypercorn.readthedocs.io
Daphne: github.com
Nginx: nginx.org
Docker: www.docker.com
Kubernetes: kubernetes.io
PostgreSQL: www.postgresql.org
SQLite: www.sqlite.org
Celery: docs.celeryq.dev
SQLAlchemy: www.sqlalchemy.org
Django REST framework: www.django-rest-framework.org
Jinja: jinja.palletsprojects.com
Click: click.palletsprojects.com
HTMX: htmx.org
Server-Sent Events (SSE): developer.mozilla.org
WebSockets (RFC 6455): www.rfc-editor.org
HTTP/2 (RFC 9113): www.rfc-editor.org
HTTP/3 (RFC 9114): www.rfc-editor.org
uv: docs.astral.sh
Amazon Web Services (AWS): aws.amazon.com
Microsoft Azure: azure.microsoft.com
Google Cloud Run: cloud.google.com
Amazon ECS: aws.amazon.com
AlloyDB for PostgreSQL: cloud.google.com
Fly.io: fly.io
Render: render.com
Cloudflare: www.cloudflare.com
Fastly: www.fastly.com
Watch this episode on YouTube: youtube.com
Episode #533 deep-dive: talkpython.fm/533
Episode transcripts: talkpython.fm
Theme Song: Developer Rap
🥁 Served in a Flask 🎸: talkpython.fm/flasksong
---== Don't be a stranger ==---
YouTube: youtube.com/@talkpython
Bluesky: @talkpython.fm
Mastodon: @talkpython@fosstodon.org
X.com: @talkpython
Michael on Bluesky: @mkennedy.codes
Michael on Mastodon: @mkennedy@fosstodon.org
Michael on X.com: @mkennedy
Principles for hiring engineers (Interview)
This week we’re joined by Jacob Kaplan-Moss and we’re talking about his extensive writing on work sample tests. These tests are an exercise, a simulation, or a small slice of real day-to-day work that candidates will perform as part of their job. Over the years, as an engineering leader, Jacob has become a practicing expert in effectively hiring engineers — today he shares a wealth of knowledge on the subject.
Join the discussion
Changelog++ members save 5 minutes on this episode because they made the ads disappear. Join today!
Sponsors:
Square – Develop on the platform that sellers trust. There is a massive opportunity for developers to support Square sellers by building apps for today’s business needs. Learn more at developer.squareup.com to dive into the docs, APIs, SDKs and to create your Square Developer account — tell them Changelog sent you.
FireHydrant – The reliability platform for every developer. Incidents impact everyone, not just SREs. FireHydrant gives teams the tools to maintain service catalogs, respond to incidents, communicate through status pages, and learn with retrospectives. Try FireHydrant free for 14 days at firehydrant.io
Retool – Retool is a low-code platform built specifically for developers that makes it fast and easy to build internal tools. Instead of building internal tools from scratch, the world’s best teams, from startups to Fortune 500s, are using Retool to power their internal apps. Learn more and try it for free at retool.com/changelog
WorkOS – A platform that gives developers a set of building blocks for quickly adding enterprise-ready features to their application. Add Single Sign-On (Okta, Azure, Google, Microsoft OAuth), sync users from any SCIM directory, HRIS integration, audit trails (SIEM), free magic link sign-in. WorkOS is designed for developers and offers a single, elegant interface that abstracts dozens of enterprise integrations. Learn more and get started at WorkOS.com
Featuring:
Jacob Kaplan-Moss – Website, Mastodon, X
Adam Stacoviak – Website, GitHub, LinkedIn, Mastodon, X
Jerod Santo – Website, GitHub, LinkedIn, Mastodon, X
Show Notes:
Series: Work Sample Tests
Work Sample Tests: A Framework for Good Work Sample Tests: Eight Rules for Fair Tests
Work Sample Tests: Wrap Up and Q&A
The Changelog #474: Complex systems & second-order effects with Paul Orlando
A New Morality of Attainment (Goodhart’s Law)
Something missing or broken? PRs welcome!
#161: Django 2.0
See the full show notes for this episode on the website at talkpython.fm/161
Python, Django, and Channels (Interview)
Django core contributor Andrew Godwin joins the show to tell us all about Python and Django. If you’ve ever wondered why people love Python, what Django’s virtues are as a web framework, or how Django Channels measure up to Phoenix’s Channels and Rails’ Action Cable, this is the show for you. Also: Andrew’s take on funding and sustaining open source efforts.
Join the discussion
Changelog++ members support our work, get closer to the metal, and make the ads disappear. Join today!
Sponsors:
Heap – Automate the annoying parts of user analytics. No more manual anything. Just insights.
GoCD – GoCD is an on-premise open source continuous delivery server created by ThoughtWorks that lets you automate and streamline your build-test-release cycle for reliable, continuous delivery of your product.
Toptal – Scale your team and hire the top 3% of developers and designers at Toptal. Email Adam at adam@changelog.com for a personal introduction to Toptal.
Featuring:
Andrew Godwin – Website, GitHub, X
Adam Stacoviak – Website, GitHub, LinkedIn, Mastodon, X
Jerod Santo – Website, GitHub, LinkedIn, Mastodon, X
Show Notes:
This episode started on Ping
Django creators: Jacob Kaplan-Moss, Simon Willison
Python love: The Zen of Python
Python love: Great Docs – Requests as example
Jerod suggests RFC #5: Read/Write the Docs with Eric Holscher
Virtues: The Django admin site
Virtues: GeoDjango
Wikipedia has a list of well-known sites using Django
Andrew’s baby: Django Channels
Getting started with Django
Django South - consistent, easy-to-use and database-agnostic migrations for Django applications.
If sustainability is interesting to you, check out Request for Commits
Something missing or broken? PRs welcome!
Ep. 101 - Open Sourcerer of Django (Jacob Kaplan-Moss)
Jacob Kaplan-Moss is often credited for co-creating Django, one of the most popular web frameworks written in python. But that’s not exactly true. He’s also given credit for being an amazing developer. But that’s not very accurate either. Jacob tells us the true story of Django’s creation, why he calls himself a mediocre programmer, and unpacks the concept of the talent myth.
Show Links
Partner with Dev & CodeNewbie! (sponsor)
Saron's Vlog Channel
The Difference
MySQL
Django Found Fellowship Program
Hypercard
HyperTalk
AppleTalk
Adrian Holovaty
Simon Wilson
CodeNewbie Newsletter Sign up
CodeNewbie Community Newsletter Submission Guidelines
Django
Python Software Foundation
Codeland Conf
Codeland 2019
Jacob Kaplan-Moss
I'm a core contributor to Django, co-owner of Revolution Systems, former Director of Security at Heroku, and currently on the Engineering team at 18F.