I just stumbled onto Pyodide, and it's very impressive. It produces Jupyter-like notebooks in a browser. What's really amazing to me is that they have managed to get things so that python code can call javascript and javascript can call Python, all within a browser. They don't have every possible Python library working, but it comes with Matplotlib, numpy, parts of Pandas, and more. It can run Plotly.
Pyodide ias on Guthub.
See
I have no experience with it nor in-depth knowledge, since I just came across it, but it's worth a look or three .. and maybe there will be something that can translate into Leo.