ibdafna / webdash

WebAssembly powered Plotly Dash running in the browser
webdash-wine.vercel.app
BSD 3-Clause "New" or "Revised" License
148 stars 9 forks source link

WebDash

Netlify Status

WebDash is a Plotly Dash distribution that runs entirely in the browser.

screenshot

⚡ Status ⚡

⚠️ Currently in alpha stage - do not use in production! ⚠️ (Seriously, don't do it 😼)

🤔 How does it work? 🤔

The Python scientific stack, including Plotly Dash, Flask and their dependencies, are compiled to WebAssembly via Emscripten and bundled by pyodide. WebDash loads a full Python kernel (version 3.8) and runs it in a dedicated Web Worker. The kernel acts as a virtual Flask web server, serving Dash requests as if it were a normal server. On the front-end, WebDash intercepts any requests intended to go to Dash and routes them to the virtual Flask web server.

This allows the entire distribution to be served as a static website, eliminating the need for containers or virtual environments, thus enabling great scalability.

🔥 Try it in your browser 🔥

Demo app available on Netlify and Vercel.

We have seen issues with Vercel being slow to load pyodide dependencies on Chrome. If that's the case for you, please consider using FireFox to try the demo (we are working with Vercel on this) or try the Netlify deployment link instead

💣 (Very) Important stuff to be aware of 💣

🎈 Running your own app 🎈

💚 Contributing 💚

See the contributing guide for information about the project's structure and setting up a development environment.

Disclaimer

WebDash started as a research project Itay Dafna (@ibdafna) worked on at Bloomberg LP, with help from Paul Ivanov (@ivanov) who provided technical mentorship, guidance and some laughs. All rights are reserved to Bloomberg LP.

Much of this README is based on repos @jtpio owns.