Pyodide: a Python distribution based on WebAssembly
github.com
github.com
I love using Pyodide to build web UIs for trying out new Python libraries. Here's one I built a few weeks ago to exercise my pure-Python SQLite AST parser, for example: https://tools.simonwillison.net/sqlite-ast
It's also pretty easy[1] to get C or Rust libraries that have Python bindings compiled to a WebAssembly wheel that Pyodide can then load.
Here's a bit of a nutty example - the new Monty Python-like sandbox library (written in Rust) compiled to WASM and then loaded in Pyodide in the browser: https://simonw.github.io/research/monty-wasm-pyodide/pyodide...
[1] OK, Claude Code knows how to do it.
Maybe if browsers start shipping or downloading WASMs for python and others on request. And storing them for all sites going forward. Similar to how uv does it for for venvs it creates, there are standalone python version blobs.
If I could wave a magic wand to reset any programming language adoption at this point I would choose Python over Javascript.
I think Pythons execution model, deep OO behaviour, and extremely weak guarantees have done a lot of damage to the soundness and performance of the technology world.
Even more so when you consider how falsy values work in practice (data validation becomes really easy), there are a few gotchas, but in general they are pretty easily avoided in practice. JS is really good at dealing with garbage input in ways that don't blow up the world... sometimes that's a bad thing, but in practice it can also be a very good thing. But in the end it's a skill issue regarding understanding far more than a deep flaw. Not that there aren't flaws in JS... I think Date's in particular can be tough to deal with... a string vs a String instance is another.
You use Python on the web because there's existing software written in Python that you want to run in a browser.
I’m having trouble coming up with a single Python-shaped problem that can’t be contained within JavaScript-shaped ecosystem.
Even if you can go outside the blessed languages, it isn't without pain and scars.
https://jupyter.org/try-jupyter/lab/
Stuff like numpy seems to just work
A reactive notebook for Python that runs in browser, powered by Pyodide. I have been using it extensively for teaching Python to non-STEM students that do not need the added friction of navigating the CLI or filesystem hierarchy.
It's actually a very good way to teach coding in python/c++(11, 17 or even 23), explore language features or your own library within browser and allow students to execute code by hosting just some static html pages and some assets without any backend.
Now I'd probably just get Claude Code to write something locally, but there might be some value in a version of pyground that can use an LLM to write the Python code for you (and give it the data shape) but keeps the local execution setup the same.
WebAssembly's isolation means you get sandboxing for free without any server infrastructure. Of course users could cheat and submit code that doesn't actually pass the tests, but so far everybody has been friendly and I haven't needed to validate results server-side. Hopefully sharing the link here doesn't make that worse!
I’ve been working on a small (~800-line) Python system that uses sparse regression to discover physical laws from raw data. It was able to estimate the Sun’s rotation (~25.1 days vs 27 days actual) and found a temperature ~ velocity^3.40 relationship in solar wind data.
Having this kind of lightweight stack in the browser could make exploratory science much more accessible.
You could say "Granted, there are those who use the webcam capture API, but if we compare it to HTML, CSS, JavaScript, then the webcam capture API is simply not existing anywhere near that level."
Like how not every website needs to use a webcam, not every website needs to port existing code to the web or accelerate heavy computation, which is what WASM is meant for... that doesn't mean it's not useful for ones that do. It's not supposed to replace any of HTML/CSS/JS
https://webassembly.org/docs/faq/
“Is WebAssembly trying to replace JavaScript?
No! WebAssembly is designed to be a complement to, not replacement of, JavaScript. While WebAssembly will, over time, allow many languages to be compiled to the Web, JavaScript has an incredible amount of momentum and will remain the single, privileged (as described above) dynamic language of the Web.”
pydantic/monty, vercel-labs/just-bash, amla sandbox, csl-core, microsandbox, workerd, wasmtime-mte
containers/bubblewrap: https://github.com/containers/bubblewrap#sandboxing
The bubblewrap readme mentions containers as binaries with binctr; I guess without overlayfs or other file-level re-deduplication due to the container fs in the binary.
Perhaps similarly, also TIL UKI are easier for UEFI Secure Boot to check signatures on than (kernel, initrd) pairs
https://nvd.nist.gov/vuln/detail/CVE-2025-68668
not actively developed anymore