DEV Community

Cover image for Python...in the browser!? 🀯 : A Web Monetization x Web Assembly Experiment
Ari πŸͺ
Ari πŸͺ

Posted on

Python...in the browser!? 🀯 : A Web Monetization x Web Assembly Experiment

What I built

I built a demo hub where users can experiment with data science by graphing data sets in the browser then downloading them. Web Monetized browsers won't see the Ads on the page and can also experiment with additional graphing tools.

Note: This project is in the demo phase. In the future, I’d like to build out the graphing tools to handle more sophisticated data sets. As well as add a login/dashboard feature. πŸ™‚

Why I built it

While researching what to build for the Grant For the Web Hackathon I initially thought of creating something with a JavaScript framework since I'd be interacting with the browser API. However, my journey here on Dev.to is to learn more about Python and what we can do with it. So I thought about how I could incorporate Web Monetization with Python. After some digging, I found this cool project created by Mozilla called Pyodide!

"Pyodide is an experimental project from Mozilla to create a full Python data science stack that runs entirely in the browser."
~ Michael Droettboom

Some of you may be thinking what's wrong with just using JavaScript? JavaScript is great but can you imagine a world where you can use mature data science libraries in the browser to quickly create data science tools and machine learning models? Not to mention being able to share those resources over the web? AND being able to make some money in the process?! πŸ€―πŸ™ŒπŸΎ

Pyodide is currently in its infancy and there are caveats and performance drawbacks but I'm excited to see where it goes!


Submission Category:

Creative Catalyst
Exciting Experiments

Demo

Link to Code

GitHub logo ari-hacks / the-hub

πŸ“ˆπŸ“Š A hub where users can experiment with graphing and Python in the browser (https://pyodide-experiment.herokuapp.com/)

Data Hub πŸ“ˆ

MIT license

About

A demo hub where users can experiment with data science by graphing data sets in the browser then downloading them. Web Monetized browsers won't see the ads on the page and can also experiment with additional graphing tools.

This Project is a Grant For the Web x DEV Hackathon Runner-Up Winner πŸ†πŸŽ‰

✍️ Blog Post

Features

  • csv upload
  • Enhanced Plots with Plotly
  • Web Monetization enabled
  • Image download

Testing Data

Set up

Requirements

Local development

After the above requirements have been met:

  1. Clone…

How I built it

Stack


Additional Resources/Info

Top comments (2)

Collapse
 
waylonwalker profile image
Waylon Walker • Edited

This looks 100% static, you should host on github pages, netlify, vercel (formerly zeit), or something like that!

What was your experience with pyodide? Looks heavy so I have written it off. I should really just try it out though as it really is some cool tech.

Collapse
 
ari_hacks profile image
Ari πŸͺ

Hey Waylon! I was originally going to host on Heroku but I've been wanting to check out Netlify - thanks for the suggestion I'm going to try and spin that up this week if time permits. πŸ™‚

There are definitely performance drawbacks but it was fun to learn and build with.

Today I found this cool project called PyMedPhys(Open Source! πŸ™ŒπŸΎ ) that is using it in production! I'm hoping to see more tools like this as Pyodide matures.