Mozilla Makes Pyodide Community Project
Written by Kay Ewbank   
Tuesday, 04 May 2021

Pyodide is now an independent community project rather than being developed in-house at Mozilla. Pyodide provides a way to run Python in web browsers by using a WebAssembly compilation of the CPython interpreter and scientific stack.

Pyodide began life as an experimental project from Mozilla to create a full Python data science stack to run entirely in the browser. The need for a web-based Python arose because JavaScript lacked a mature suite of data science libraries, and was missing several features that are useful for numerical computing, such as operator overloading. 


As an alternative, the Mozilla developers came up with Pyodide. It brings the Python 3.8 runtime to the browser via WebAssembly, along with the Python scientific stack including NumPy, Pandas, Matplotlib, SciPy, and scikit-learn. Over 75 packages are currently available, and developers can also install pure Python wheels from PyPi.  Pyodide includes a comprehensive foreign function interface which exposes the ecosystem of Python packages to Javascript and the browser user interface, including the DOM, to Python.

Pyodide was created as part of Mozilla's Iodide project to develop an experimental web-based notebook environment for literate scientific computing and communication. Mozilla stopped work on Iodide and it is no longer maintained. This follows a similar pattern to Mozilla's decision to transfer Rust to the Rust Foundation after Mozilla laid off 250 employees as part of a company restructuring in 2020.

Pyodide provides transparent conversion of objects between JavaScript and Python. When used inside a browser, Python has full access to the Web APIs.

Pyodide has also been updated to version 0.17 as part of the move to a community version. The development team says that Pyodide 0.17.0 is a major step forward from previous versions. It includes major maintenance improvements,a thorough redesign of the central APIs, and careful elimination of error leaks and memory leaks. Among the improvements, the type translations module has been significantly reworked with the goal that round trip translations of objects between Python and Javascript produces an identical object.

Another major new feature is the implementation of a Python event loop that schedules coroutines to run on the browser event loop. This makes it possible to use asyncio in Pyodide. It is also now possible to await Javascript Promises in Python and to await Python awaitables in Javascript. This allows for seamless interoperability between asyncio in Python and Javascript.


More Information

Pyodide On GitHub

Pyodide Website

Related Articles

Google Promises Increased Support For Python

Python Adopts Pattern Matching - Kitchen Sink Next

PyTorch Developer Day Updates

Python 3.9 Improves Dictionary Handling

Mozilla Layoffs - The Fallout

Rust Team Announces Rust Foundation


To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.


Apache Arrow Adds New View Data Types

Apache Arrow 14 has been released with new view data types for columnar formats, and a wide range of other improvements.

Notepad++ Twentieth Anniversary

An updated version of Notepad++ is available, on its 20th anniversary. The text editor first saw light in November 2003 when it was released on SourceForge.

More News




or email your comment to: