DEV Community

Discussion on: Use Python in your browser client code together with JS. No server required, thanks to Web Assembly

Collapse
 
rubenwap profile image
Ruben Sanchez

Thanks Jack! I am a newbie myself in WASM, so I hope I am not getting this wrong:

The methods and functions that you see in the snippet are all Javascript. The .wasm module which contains the Python distribution used for this (Pyodide) is also loaded via Javascript, but you don't see it here because the loading takes place in the imported pyodide.js file

This Pyodide project not only compiles Python into Web Assembly, but it also provides a Javascript API so you can interact with it via the browser, so all what you see here are functions related to the API. You might be interested in this, which contains the JS API explanation: pyodide.readthedocs.io/en/latest/a...