Running Python ASGI apps in the browser via Pyodide + a service worker
AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.
Why it matters
Running Python web apps like Datasette entirely in-browser now avoids broken JavaScript, opening the door to more fully client-side Python tools.
Simon Willison runs Python web applications directly inside a web browser using Pyodide, a way of executing Python code within WebAssembly. His older approach used Web Workers, which broke JavaScript embedded in generated pages, including Datasette plugins. A new method using service workers, browser scripts that intercept network requests, fixes that. Live demos exist online, and Datasette Lite will be upgraded later.
Willison delegated the engineering to Claude Opus 4.8 in Claude Code for web, and it produced a working service-worker approach for running ASGI Python apps in Pyodide. This is research code on GitHub with public demos, not a product; the practical payoff arrives when Datasette Lite itself is upgraded. Competition angle: Anthropic coding agents are now shipping working infrastructure experiments, not just answering questions.
Datasette Lite (circa May 2022) used Web Workers plus navigation interception to fetch HTML generated by the Python ASGI app, but script tags in responses never executed, breaking plugins. The new approach routes the ASGI app through a service worker instead, demonstrated with FastCGI-style demos and Datasette 1.0a31 on GitHub Pages. Willison says he is still working out the mechanics before upgrading Datasette Lite.
Read the original
This summary exists to save you time, not to replace the source.
Key terms
Datasette Lite Pyodide Claude Opus 4.8 Claude Code Datasette 1.0a31
Was this summary useful?
One click, anonymous. It tells us which summaries to re-run.
Related reading
Code-driven AI illustrations are more useful than images from dedicated image models
Code-driven AI illustrations let designers edit assets directly in code, saving time on iteration and ensuring consistency, which is a game-changer for teams that need rapid, reusable visual content.
A hierarchical note-taking app for building large personal knowledge bases
Trilium lets users build and navigate massive personal knowledge bases without duplicating content, saving time on organization and retrieval.
Desktop apps in Go with native UI or web frontend
Go developers can now ship cross-platform desktop and mobile apps in a single small binary without cgo or heavy runtimes, cutting build complexity and deployment size.
OpenBitFun: an agent workspace with four harness modes and phone remote control
OpenBitFun lets agents run on any machine and be controlled from a phone, eliminating the need to choose between local power and remote access, saving developers time switching contexts.
Intel One Mono: a monospaced font designed with low-vision developers
Developers with low vision or eye fatigue can read code more clearly, reducing errors and improving productivity.