DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Big Data
  4. Pyodide: Mozilla Brings Python to the Browser

Pyodide: Mozilla Brings Python to the Browser

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

Kara Phelps user avatar by
Kara Phelps
·
Apr. 22, 19 · News
Like (4)
Save
Tweet
Share
7.97K Views

Join the DZone community and get the full member experience.

Join For Free

Image title

Screenshot of Pyodide's demo notebook

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).

Python (language) Data science

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Best Practices for Writing Clean and Maintainable Code
  • How To Validate Three Common Document Types in Python
  • Apache Kafka vs. Memphis.dev
  • Why It Is Important To Have an Ownership as a DevOps Engineer

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: