Skip to content
The Python scientific stack, compiled to WebAssembly
Branch: master
Clone or download
mdboom Merge pull request #358 from msabramo/patch-3 soupseive => soupsieve
Latest commit b95b669 Mar 22, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Update build cache version Jan 17, 2019
CLAPACK Use -Os and small INLINING_LIMIT for files liked with LAPACK Nov 15, 2018
benchmark Build the _decimal C module Feb 25, 2019
bin Explicitly use python3 for pyodide_build Jan 9, 2019
cpython Link to @dgym Mar 19, 2019
docs Merge pull request #331 from mdboom/mkpkg Mar 12, 2019
lz4 Use LZ4 filesystem compression, using the canonical C implementation Sep 19, 2018
pyodide_build Merge pull request #336 from mdboom/rebuild-package-on-depchange Mar 14, 2019
src Bump version: 0.9.0 → 0.10.0 Mar 21, 2019
test Add test for wasm_backend. Fix PDF test. Feb 21, 2019
tools Ignore the gfortran link Jan 24, 2019
.clang-format Remove keys from .clang-format Nov 13, 2018
.editorconfig Fix #71: Upgrade to Python 3.7 Sep 6, 2018
.gitignore Update link to recurse center code of conduct Jul 18, 2018 Add linting Jun 14, 2018
Dockerfile CLAPACK setup Oct 31, 2018
LICENSE Initial commit Feb 23, 2018
Makefile Partially address #338: Provide simple method for interactive testing Mar 15, 2019
Makefile.envs Implement the ABI number functionality. Jan 22, 2019 Partially address #338: Provide simple method for interactive testing Mar 15, 2019
remove_modules.txt Lots of pandas fixes: Apr 24, 2018
run_docker Allow configuring run_docker ports using env vars Mar 21, 2019
setup.cfg Rename to dryrun, add docstring and doctest Oct 23, 2018


Build Status

The Python scientific stack, compiled to WebAssembly.

It provides transparent conversion of objects between Javascript and Python. When inside a browser, this means Python has full access to the Web APIs.

While closely related to the iodide project, Pyodide may be used standalone in any context where you want to run Python inside a web browser.

For more information, see the demo and the documentation.


Building is easiest on Linux. For other platforms, we recommend using the Docker image (described below) to build Pyodide.

Make sure the prerequisites for emsdk are installed. Pyodide will build a custom, patched version of emsdk, so there is no need to build it yourself prior.

Additional build prerequisites are:

  • A working native compiler toolchain, enough to build CPython.
  • A native Python 3.7 to run the build scripts.
  • PyYAML
  • lessc to compile less to css.
  • uglifyjs to minify Javascript builds.
  • ccache (optional) recommended for much faster rebuilds.


Using Docker

We provide a Debian-based Docker image on Docker Hub with the dependencies already installed to make it easier to build Pyodide.

  1. Install Docker

  2. From a git checkout of Pyodide, run ./run_docker

  3. cd /src

  4. Run make to build.

You can edit the files in your source checkout on your host machine, and then repeatedly run make inside the Docker environment to test your changes.


Install the following dependencies into the default Python installation:

pip install pytest selenium pytest-instafail

Install geckodriver and chromedriver somewhere on your PATH.

pytest test/

Manual Testing

The port 8000 of the docker environment and the host system are automatically binded when ./run_docker is run.

This can be used to test the pyodide builds running within the docker environment using external browser programs on the host system.

To do this, simply run ./bin/pyodide serve

This serves the build directory of the pyodide project on port 8000.

  • To serve a different directory, use the --build_dir argument followed by the path of the directory
  • To serve on a different port, use the --port argument followed by the desired port number

Make sure that the port passed in --port argument is same as the one defined as DOCKER_PORT in the run_docker script.

Once the webserver is running, for simple interactive testing, visit the URL http://localhost:8000/console.html


Install the same dependencies as for testing.

make benchmark


Python is linted with flake8. C and Javascript are linted with clang-format.

make lint

You can’t perform that action at this time.