Hacker News new | ask | show | jobs
by lo5 1462 days 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....

About ~100 lines of code.

1 comments

Maybe what it offers is abstraction. Boilerplate not required for immediate results, just a pyscript tag.
I 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?