4 ms·
Does PyScript offer anything of significance over and above what Pyodide already offers, other than several py-* tags? In my experience, it's trivial accomplis
by lo5 4y ago
Does PyScript offer anything of significance over and above what Pyodide already offers, other than several py-* tags?
In my experience, it's trivial accomplish this with Pyodide.
Here's a web worker that hosts Pyodide and loads packages, PyPI wheels, external modules, etc. and launches type=text/python script tags in-browser:
https://github.com/h2oai/nitro/blob/main/web/public/nitride.js https://github.com/h2oai/nitro/blob/main/web/public/nitride....
About ~100 lines of code.
- deleted 4y ago[deleted]
- j0hnyl 4y agoMaybe what it offers is abstraction. Boilerplate not required for immediate results, just a pyscript tag.
- lo5 4y agoI understand that, but it's not much of an abstraction: const pyodide = await loadPyodide(), input = document.getElementById('#input').textContent, output = await pyodide.runPythonAsync(input); document.getElementById('#output').textContent = output; I can see there are other tags (py-env, etc.) that provide some yaml to fetch additional assets, but again, nothing significant that warrants the hype. Maybe I'm missing something?