Skip to content
forked from pyodide/pyodide

Python with the scientific stack, compiled to WebAssembly.

License

Notifications You must be signed in to change notification settings

bus3297/pyodide

Repository files navigation

Pyodide

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.

See the demo

Building

These instructions were tested on Linux. OSX should be mostly the same.

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.6 or later to run the build scripts.
  • PyYAML
  • lessc to compile less to css.
  • uglifyjs to minify Javascript builds.
  • ccache (optional) recommended for much faster rebuilds.

make

Testing

Install the following dependencies into the default Python installation:

pip install pytest selenium pytest-instafail

Install geckodriver and chromedriver somewhere on your PATH.

make test

Benchmarking

Install the same dependencies as for testing.

make benchmark

Linting

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

make lint

About

Python with the scientific stack, compiled to WebAssembly.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 62.5%
  • C 24.9%
  • JavaScript 4.8%
  • Makefile 2.6%
  • C++ 2.3%
  • Shell 2.0%
  • Other 0.9%