simonwillison.net

Running Python ASGI apps in the browser via Pyodide + a service worker (opens in new tab)

Research: is my version of Datasette that runs entirely in the browser using Pyodide in WebAssembly. When I first built it I used Web Workers and code that intercepts navigation operations and fetches the generated HTML by running the Python app. This worked, but had the disadvantage that any JavaScript in tags would not be executed - breaking some Datasette functionality and a whole lot of Datasette plugins. This morning I (in Claude Code for web) of figuring out how to run Python A...

Read the original article
Sign in to keep reading the full article.

Covered in 1 article

Discussed on Substack
Feeds

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help