Live data from Hacker News

PyScript: Run Python in your HTML

pyscript.net

1–10 of 71 posts

Re: PyScript: Run Python in your HTML

#4
This is awesome and has so much potential!

Regarding the size of the download, I know there is ongoing work in the Pyodide project to create a much smaller python runtime that will help tremendously. Also, the script will be cached once you download it once.

EDIT: Also, you don't need NPM or anything locally to run these

Re: PyScript: Run Python in your HTML

#7
post #6

Is this similar at all to the old pyjs/pyjamas project? I had some fun playing with that but there was no way I would have ever actually made anything serious with it.

I made a few internal UIs with it. It was easy for that and worked well (and fun). This was 2010

Re: PyScript: Run Python in your HTML

#8
post #6

Is this similar at all to the old pyjs/pyjamas project? I had some fun playing with that but there was no way I would have ever actually made anything serious with it.

That was a very cool project, though I believe they aren't really related, even though they seem similar. Pyjs/Pyjamas was a more of a Python to JavaScript transpiler.

This is the actual CPython runtime with full standard library and many of the Python mathematical and plotting libraries compiled to WASM, running in the browser. It can also be included with other HTML and JavaScript on a web page just by wrapping the Python in a tag.

Re: PyScript: Run Python in your HTML

#9
Pyodide is really cool, we got a Python library we were working on working in JS in the browser with it, including Pandas iirc, without too much trouble (though getting http requests working required a little hackery).

Re: PyScript: Run Python in your HTML

#10
post #5

For some reason, I can't see this linked anywhere on the site, but there is an examples page: https://pyscript.net/examples/ (This was presented today as a pycon keynote talk!)

The js and css files should be hosted on a CDN otherwise people copying/pasting these demos might chew up pyscript.net resources.
Post reply on HN