Which computer language will survive by 2026?

Python in the browser: Mozilla converts Pyodide into an independent project

Mozilla has outsourced Pyodide and transferred it to an independent organization. The project to run Python code in the browser is now under the wing of a team of volunteers who have played a key role in the development so far. In addition to its own GitHub organization, there is a dedicated site that primarily contains documentation.

Pyodide is primarily aimed at data science applications that run directly in the browser. It uses the Emscripten compiler toolchain to translate the CPython interpreter and Python packages with C extensions to WebAssembly. Mozilla first presented the project to the public two years ago.

Pyodide outlived iodide

The Iodide project, which was also started at Mozilla, was a major source of inspiration for the Python integration. The web-based tool for data analysis should work similarly to Jupyter notebooks and enable the creation of interactive web documents. However, in the fall of 2020, Mozilla officially discontinued Iodide. Since then, the associated GitHub repository has been lying idle. The source code is still available, but the readme reports the end of further development, which is also reflected in the age of the most recent changes four months ago.

Pyodide has arguably met with widespread interest independently of Iodide. According to the announcement of the outsourcing of the project to Mozilla Hacks, it is also used in numerous projects outside the company and is actively being developed by the community.

Independent further development

The transfer to an independent project that has now taken place is at least a clear message that Pyodide has a future. Iodide's readme explains that Pyodide will not be affected by the discontinuation of the project, but the austerity measures and layoffs at Mozilla in August 2020 have led to uncertainty in various areas and projects. The Rust programming language, one of the most prominent projects that started at Mozilla, has been under the umbrella of its own Rust Foundation since February.

The Pyodide project is not that far yet, at least at the moment, but in addition to the GitHub repository there is a separate project site that contains information on the governance process in addition to the documentation. Accordingly, a "consensus-seeking" process is pending for developments. For the roles of project participants, the site differentiates between contributors, community team members and the core development team.

Looking forward

A roadmap on the Pyodide site shows the plans for the further development of the project. The team wants to reduce the size of the download file and the start time from the current 6.4 MB or four to five seconds. It also aims to improve performance when executing Pyodide Python code. In addition, there is a simplified system for loading packages and updating the connected SciPy package, which currently has the status of 2016.

Further plans are aimed at APIs for synchronous I / O instead of asynchronous I / O in order to implement important parts of the Python ecosystem that are designed, among other things, for interaction on the command line. Building on this, web APIs are planned that will implement parts of the standard library and enable one.

Version 0.17 with improved type translation

Parallel to the transfer of the project, the Pyodide operators announced version 0.17, which among other things brings some improvements in the translation of types between Python and JavaScript. The transfer of objects either from JavaScript to Python and back to JavaScript or vice versa from Python to JavaScript and back to Python, with a few exceptions, should result in the original object.

The team has also improved multitasking so that both JavaScript promises in Python code and Python awaitables in JavaScript code work. Finally, errors or exceptions can now be caught and thrown across languages.

Further details on Mozilla's Pyodide move to standalone organization and the 0.17 release can be found at Mozilla.hacks.


Read comments (21) Go to the homepage