ARTFEED — Contemporary Art Intelligence

Running Python ASGI Apps in Browser via Pyodide and Service Workers

other · 2026-05-30

Simon Willison has developed a method to run Python ASGI apps in the browser using Pyodide (WebAssembly Python) combined with Service Workers, enabling full execution of Python web applications client-side. This builds on his earlier Datasette Lite project, which previously used Web Workers but failed to execute JavaScript in <script> tags, breaking plugins. The new approach, prototyped with Claude Opus 4.8, allows complex ASGI frameworks like FastCGI and Datasette 1.0a31 to run entirely in the browser. Willison plans to upgrade Datasette Lite to use this technique. The work was announced on 30th May 2026 via his blog.

Key facts

  • Simon Willison created Datasette Lite to run Datasette in the browser via Pyodide.
  • Original version used Web Workers but couldn't execute JavaScript in <script> tags.
  • New approach uses Service Workers instead of Web Workers.
  • Claude Opus 4.8 was used to prototype the solution.
  • A basic ASGI FastCGI demo and a Datasette 1.0a31 demo are available.
  • Willison plans to upgrade Datasette Lite with this technique.
  • Announced on 30th May 2026.
  • Blog post includes a sponsorship call for $10/month.

Entities

Artists

  • Simon Willison

Sources