All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Running Python code in a sandbox with MicroPython and WebAssembly

By

Simon Willison

2d ago· 9 min readenInsight

Summary

The article describes the author's experimentation with running Python code in a sandbox environment using MicroPython compiled to WebAssembly (WASM). The author has released an alpha package called micropython-wasm and is using it for a code execution sandbox plugin for Datasette Agent. The piece discusses the motivation behind sandboxing (plugin extensibility for projects like Datasette, LLM, and sqlite-utils), the technical approach of using MicroPython compiled to WASM for safe code execution, and the characteristics that make this approach promising compared to previous attempts.

Key quotes

· 2 pulled
I'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 I've been looking for.
I absolutely love plugins as a mechanism for extending software. A carefully designed plugin system can transform a good tool into an incredible platform.
Snippet from the RSS feed
I’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 …

You might also wanna read