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. 

pyodide

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.

pyodide

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.

Banner


Opaque Systems Introduces Gateway GenAI Solution
14/03/2024

Opaque Systems has announced an early access program for Opaque Gateway, software designed to address data privacy, security, and sovereignty concerns in managing GenAI implementations.



Pi Day - The Great Unanswered Questions
14/03/2024

It's Pi day again, again, again... Even after so many, I still have things to say about this most intriguing number. The most important things about Pi is that it is irrational and one of the few tran [ ... ]


More News

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info