Simon Willison's WeblogMay 30, 2026, 9:02 PM

Running Python ASGI Apps in the Browser via Pyodide + a Service Worker

Original: Running Python ASGI apps in the browser via Pyodide + a service worker

A Service Worker experiment enables Python ASGI apps to run in-browser with Pyodide while improving script compatibility.

Simon Willison demonstrates an experiment for running Python ASGI apps entirely in the browser using Pyodide and a Service Worker. The approach addresses a Datasette Lite limitation: HTML returned through intercepted navigation did not execute script tags, breaking features and plugins. Claude Opus 4.8, used through Claude Code for web, helped explore the implementation. Basic ASGI and Datasette 1.0a31 demos are available.

Simon Willison shares a new experiment in running Python ASGI applications in the browser. The core approach uses Pyodide to let Python run in a WebAssembly environment, paired with a Service Worker to handle in-browser requests. This research continues the direction of Datasette Lite: letting Datasette run directly in the user's browser without depending on a server.

Full summary

Free shows the 3-line summary; Pro unlocks the full deep summary (~300 words) so you never have to click through.

See Pro plans →

Want the original English / full article?

Read on Simon Willison's Weblog →

Summaries are AI-generated; the original article is authoritative.