Pyodide is a Python distribution for the browser and Node.js based on WebAssembly
Go to file
Madhur Tandon 0a72c4efd8 Expose Port 8000 for easy testing
Add ``serve`` module as a command line subcommand which enables us to start a server within the docker environment.
This is helpful in testing the ``pyodide`` builds running within the docker environment using external browser
programs of the same machine.
2018-12-11 12:55:24 +05:30
.circleci Update tests with packaged scipy 2018-12-04 20:37:15 +01:00
CLAPACK Use -Os and small INLINING_LIMIT for files liked with LAPACK 2018-11-15 13:24:27 +01:00
benchmark Lint 2018-11-15 13:24:27 +01:00
bin Use bash instead of dash shell on ubuntu 2018-09-25 12:16:53 +02:00
cpython Make cProfile work 2018-11-08 15:20:53 -05:00
docs Update using_pyodide_from_javascript.md 2018-11-08 17:27:08 -05:00
emsdk Increase FuncCastEmulation NUM_PARAMS further 2018-11-15 13:22:36 +01:00
lz4 Use LZ4 filesystem compression, using the canonical C implementation 2018-09-19 16:44:54 -04:00
packages Merge pull request #271 from darthtrevino/feature/add_networkx_package 2018-12-10 22:22:45 +01:00
pyodide_build Expose Port 8000 for easy testing 2018-12-11 12:55:24 +05:30
six Add documentation to new build tools. 2018-06-22 10:22:00 -04:00
src Bump version: 0.3.0 → 0.4.0 2018-12-10 17:26:42 -05:00
test Merge pull request #266 from rth/dedent-by-default 2018-12-10 17:25:37 -05:00
tools Upgrade to emscripten 1.38.12 2018-10-01 18:56:57 -04:00
.bumpversion.cfg Bump version: 0.3.0 → 0.4.0 2018-12-10 17:26:42 -05:00
.clang-format Remove keys from .clang-format 2018-11-13 09:46:24 -05:00
.editorconfig Fix #71: Upgrade to Python 3.7 2018-09-06 10:56:33 -04:00
.gitignore Use dummy threading + re-enable C++ files that failed due to a gloabl 2018-11-15 13:22:36 +01:00
CHANGELOG.md Add some community and contributing guidelines 2018-06-07 15:43:04 -04:00
CODE-OF-CONDUCT.md Update link to recurse center code of conduct 2018-07-18 18:52:18 -04:00
CONTRIBUTING.md Add linting 2018-06-14 14:19:08 -04:00
Dockerfile CLAPACK setup 2018-10-31 15:12:43 +01:00
LICENSE Initial commit 2018-02-23 14:21:29 -05:00
Makefile Update the iodide/pyodide-env:0.3.1 image 2018-11-15 13:24:27 +01:00
Makefile.envs Update PATH 2018-10-01 21:16:04 -04:00
README.md Trivial change to ping CI 2018-11-07 16:15:43 -05:00
remove_modules.txt Lots of pandas fixes: 2018-04-24 19:29:54 -04:00
run_docker Expose Port 8000 for easy testing 2018-12-11 12:55:24 +05:30
setup.cfg Rename to dryrun, add docstring and doctest 2018-10-23 12:13:59 +02:00

README.md

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.

For more information, see the demo and the documentation.

Building

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.

make

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.

Testing

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/

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