2026-11-12 · 6 min read
Run Python in the browser with Pyodide
How draw runs Python in the browser with WebAssembly, why that matters for learners, and what the limitations are.
Traditionally, running Python meant installing it. That is a real barrier in a classroom, a library, or a first lesson. draw removes it by running Python in the browser.
What is Pyodide?
Pyodide is a Python distribution compiled to WebAssembly. It includes the Python interpreter and a set of packages, and it can run inside a web page without a server executing your code.
In draw, Python runs in an isolated Web Worker. The worker cannot read the page, access browser storage, or make network requests. The drawing commands are sent back to the page and rendered as SVG.
Why run Python locally in the browser?
- No install. Students open a link and start coding.
- No server cost per run. The code executes on the learner’s device.
- Fast feedback. The result appears without a round trip to a server.
- Privacy. The Python source does not need to leave the browser to run.
What are the limits?
WebAssembly is powerful, but it is not a full desktop environment. The first load is larger than a plain web page because the Python runtime must download. Very large packages or long-running programs are not a good fit, and browser memory is limited.
draw keeps the environment focused: drawing commands, maths, and the Python standard library. That is enough for learning and for small creative projects.
Try it
Open the editor, write a few lines, and press Run. If you are new to Python, the 22-step tutorial starts with a blank canvas and builds a planet scene. You can also read how to draw with Python in the browser.
The important part is not the technology. It is that the distance between “I want to try Python” and “I made something” is now a single page load.