Show HN: Marimo – open-source reactive Python notebook – running in WASM (marimo.app)
It’s now possible to run marimo notebooks entirely in the browser via WebAssembly (WASM).
- A marimo tutorial as a WASM notebook: https://marimo.app/l/c7h6pz
- Training a neural network with Karpathy’s micrograd: https://marimo.app/l/xpd4te
- Visualizing attractors, as a read-only app: https://marimo.app/l/e9wii1?mode=read
- A blank notebook: https://marimo.new
- Docs: https://docs.marimo.io/guides/wasm.html
WASM notebooks let you experiment with code without having to install Python on your machine. These notebooks can be easily shared — marimo includes a button that generates a marimo.app URL (code encoded as a query parameter), and marimo.app has a built-in permalink generator. We also support embedding via iframes: you can use this to (say) author interactive documentation or standalone interactive blog posts. We now in fact use embedded WASM notebooks throughout our API docs.
Our WASM notebook is powered by Pyodide [3], a WASM-based Python distribution. Pyodide can run any Python package that has a pure Python wheel, as well as many popular libraries for scientific computing and machine learning, including Pandas, NumPy, SciPy, and scikit-learn. Over time, we expect more and more libraries to be packaged for Pyodide.
We’re very excited by the potential of WASM notebooks to make computing more accessible, and we’re in awe of all that the WASM and Pyodide contributors have accomplished. We have lots more planned (one example: we plan to make it easy to work with local files), and hope to share new developments with you in the future. In the meantime, please try https://marimo.app out. We’d appreciate feedback!
P.S. Our support for WASM is very new; you may encounter sharp edges. Still, since WASM-compatibility was one of the most requested features from our previous HN, we felt it was worth sharing.
[1] https://news.ycombinator.com/item?id=38971966
22 comments
[ 3.5 ms ] story [ 61.6 ms ] threadSuppose I have some notebooks that I would like to host on my website. I would want those notebooks to have the same look and feel as the rest of my website.
You can inject any css that you want to directly in the notebook, but it is likely hard to style to match your exact website.
Really looking forward to more wasm integration and seeing what’s possible there!
In addition, marimo notebooks in particular can also be used to build internal tools, since they make it very easy to create interactive UI elements that are synchronized with Python.
Most notebooks I write have a lot of text in them, discussing what I am thinking and why, how each cell fits into the global picture of what I am doing, and what the results mean.
What would you say is the selling-point of Marimo compared to Jupyter/JupyterLite?
the main differences: we are reproducible and reactive. we also aim to be more maintainable, reusable, shareable, and interactive.
For JupyterLite: since we are reactive, you can run notebooks entirely as applications (https://marimo.app/l/e9wii1?mode=read). This means you can easily embed these in (or run them standlalone as) interactive documentation or interactive blog posts.
Then just bind this to DuckDb or other APIs and this should make it quite easy to build visualizations
We have considered adding more copilot features for refactoring or text-to-cell.