Pyodide: A Python distribution for the browser
summary
Pyodide ports CPython 3.9 to WebAssembly so Python runs in the browser and Node.js, bundles a rich JavaScript↔Python FFI, and compiles popular binary extensions (numpy, pandas, scipy, matplotlib, cryptography). It provides micropip installs pure‑Python wheels and a build pipeline for binary wheels; the ecosystem includes ~120 packages and real demos: JupyterLite notebooks, live in‑browser ML training and inference, and a French high‑school deployment with ~100k weekly users. Constraints are concrete: no threading or sockets, subprocesses are missing, filesystem is in‑memory, and typical downloads are tens of megabytes (≈18 MB compressed / ≈30 MB uncompressed).
AI-written summary · about
chapters (32)
- 0:00Intro
- 1:17Serverless Python apps for the web?
- 2:27What is WebAssembly?
- 4:04The emscripten build toolchain
- 4:18Pyodide Components
- 5:41Upstream CPython WASM work
- 7:03Related projects
- 8:34Pure Python packages with micropip
- 9:06Packages with binary extensions
- 11:12Supported Python packages in Pyodide
- 12:51Foreign function interface (JS # Python)
- 14:54Example: Python utils from JavaScript
- 16:05Example: random sample
- 18:27Examples: fetch API from Python
- 18:47Examples: Buffers
- 19:33Emscripten Host Environment
- 21:24Client-only Architecture
- 22:02Client-only Web Apps in Python
- 23:35A growing ecosystem
- 24:28Notebook environments
- 25:21Pyodide in Education
- 26:33Deploying machine learning models Classical workflow
- 27:41Deploying scikit-learn models in Pyodide Use pickle?
- 28:49Classifier decision boundary example
- 30:11Packaging Scipy and Fortran
- 31:31Function Pointer Cast Handling
- 34:00Getting http.client to work (WIP)
- 35:25Asyncio in the browser
- 36:15Download sizes for packages
- 37:04Make Python package sizes web friendly
- 38:10Roadmap
- 39:49Acknowledgement
related talks
33mIodide and Pyodide: Bringing Data Science Computation to the Web Browser
31mIodide and Pyodide: Bringing Data Science...
29mHow to port a Python kernel to Pyodide for a blazingly fast in-browser coding...
45mHow to run Python in the browser
45mThe marvelous world of Python in Browser: a nice surprise
32mPyScript - what you need to know
39mPyScript - Python in the Browser
44mRethinking Data Visulisation with PyScript
