Post

I may have finally found the Python-in-a-sandbox solution I've been looking for... here's my latest experiment, this time running MicroPython in WebAssembly inside my Python applications simonwillison.net/2026/Jun/6/m...

simonwillison.netRunning Python code in a sandbox with MicroPython and WASMI’ve been experimenting with different approaches to running code in a sandbox for several years now, but my latest attempt feels like it might finally have all of the characteristics …

14 reposts133 likes

I have an incomplete project similar to this but using CPython in a Rust WASI component I've been meaning to work on. I would also love to have an easily usable Python sandbox built on WASI, I'll have to give this a try!

This is the sandboxing approach I've been eyeing for data pipeline work — isolating untrusted transforms without spinning up full containers. The WASM angle is clever. Does it handle numpy/pandas or just pure Python?

It doesn't handle any Python package that can't be inlined into a single pure Python string For numpy something based on Pyodide would be a more likely route

This would solve so many problems we have. Namely that people absolutely refuse to use anything but python, so they can't build plugins.