Mozilla Brings Python to the Browser

Mozilla Brings Python to the Browser

This is Mozilla's effort to introduce the Python data science stack to the web browser.

Mozilla introduced Pyodide last week, an open source experiment designed to create a full Python data science stack that runs out of the web browser.

Pyodide stems from Iodide, another early-stage Mozilla project, that performs data analysis without needing a remote kernel.

“Unfortunately, the ‘language we all have’ in the browser, JavaScript, doesn’t have a mature suite of data science libraries, and it’s missing a number of features that are useful for numerical computing, such as operator overloading,” Mozilla data engineer Michael Droettboom wrote in a blog post. “We still think it’s worthwhile to work on changing that and moving the JavaScript data science ecosystem forward. In the meantime, we’re also taking a shortcut: we’re meeting data scientists where they are by bringing the popular and mature Python scientific stack to the browser.”

“While Pyodide isn’t exactly novel — projects like Transcrypt, Brython, Skulpt, and PyPyJs are among several efforts to bring Python to browsers — it doesn’t require a rewrite of popular scientific computing tools (like NumPy, Pandas, Scipy, and Matplotlib) to achieve adequate performance,” VentureBeat reported last Tuesday. “Its ability to convert built-in data types enables interactions among browser APIs and other JavaScript libraries.”

Pyodide uses WebAssembly to interact with JavaScript already running in the browser. Rather than simply converting JavaScript commands into Python, Pyodide creates proxies that keep the original variable and refer back to it on demand. All JavaScript variables, even custom ones, can be called directly from Python.

In a keynote speech at PyCon 2018, Dan Callahan argued that Python’s inability to work on the web posed a threat to its survival as a programming language. Pyodide’s creators had this warning in mind.

“With so much user interaction happening on the web or on mobile devices, [Python] needs to work there or be left behind,” Droetboom wrote. “Therefore, while Pyodide tries to meet the needs of Iodide first, it is engineered to be useful on its own as well.” Pyodide’s documentation includes a section on how to use it directly from JavaScript as well as from Iodide.

If you’d like to try out Pyodide for yourself, you can go here and experiment with some higher-level features in a demo notebook (50MB download).

Thanks for reading ❤

Angular 9 Tutorial: Learn to Build a CRUD Angular App Quickly

What's new in Bootstrap 5 and when Bootstrap 5 release date?

Brave, Chrome, Firefox, Opera or Edge: Which is Better and Faster?

How to Build Progressive Web Apps (PWA) using Angular 9

What is new features in Javascript ES2020 ECMAScript 2020

Top Python Development Companies | Hire Python Developers

After analyzing clients and market requirements, TopDevelopers has come up with the list of the best Python service providers. These top-rated Python developers are widely appreciated for their professionalism in handling diverse projects. When...

Python GUI Programming Projects using Tkinter and Python 3

Python GUI Programming Projects using Tkinter and Python 3

Guide to Python Programming Language

Guide to Python Programming Language