Run Python in Your HTML via Pyodide

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • JetBrains - Developer Ecosystem Survey 2022
  • Scout APM - Less time debugging, more time building
  • pyscript

    Home Page: https://pyscript.net Examples: https://pyscript.net/examples

    This uses Pyodide [0] under the hood [1], which is CPython compiled to WebAssembly. In all my tests of it, loading takes a long time ~5 seconds. Coldbrew [2], another distribution of CPython on Wasm, is another option with similar load times.

    And Brython [3] is a completely different option without long load time: a Python interpreter implemented in JavaScript.

    If load time is important, Brython is pretty nice. If feature completeness is important, Pyodide and Coldbrew are probably best.

    [0] https://github.com/pyscript/pyscript/blob/main/pyscriptjs/sr...

    [1] https://github.com/pyodide/pyodide

    [2] https://github.com/plasticityai/coldbrew

    [3] https://github.com/brython-dev/brython

  • pyodide

    Pyodide is a Python distribution for the browser and Node.js based on WebAssembly

    This uses Pyodide [0] under the hood [1], which is CPython compiled to WebAssembly. In all my tests of it, loading takes a long time ~5 seconds. Coldbrew [2], another distribution of CPython on Wasm, is another option with similar load times.

    And Brython [3] is a completely different option without long load time: a Python interpreter implemented in JavaScript.

    If load time is important, Brython is pretty nice. If feature completeness is important, Pyodide and Coldbrew are probably best.

    [0] https://github.com/pyscript/pyscript/blob/main/pyscriptjs/sr...

    [1] https://github.com/pyodide/pyodide

    [2] https://github.com/plasticityai/coldbrew

    [3] https://github.com/brython-dev/brython

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • coldbrew

    Coldbrew is Python compiled into JavaScript using Emscripten.

    This uses Pyodide [0] under the hood [1], which is CPython compiled to WebAssembly. In all my tests of it, loading takes a long time ~5 seconds. Coldbrew [2], another distribution of CPython on Wasm, is another option with similar load times.

    And Brython [3] is a completely different option without long load time: a Python interpreter implemented in JavaScript.

    If load time is important, Brython is pretty nice. If feature completeness is important, Pyodide and Coldbrew are probably best.

    [0] https://github.com/pyscript/pyscript/blob/main/pyscriptjs/sr...

    [1] https://github.com/pyodide/pyodide

    [2] https://github.com/plasticityai/coldbrew

    [3] https://github.com/brython-dev/brython

  • brython

    Brython (Browser Python) is an implementation of Python 3 running in the browser

    This uses Pyodide [0] under the hood [1], which is CPython compiled to WebAssembly. In all my tests of it, loading takes a long time ~5 seconds. Coldbrew [2], another distribution of CPython on Wasm, is another option with similar load times.

    And Brython [3] is a completely different option without long load time: a Python interpreter implemented in JavaScript.

    If load time is important, Brython is pretty nice. If feature completeness is important, Pyodide and Coldbrew are probably best.

    [0] https://github.com/pyscript/pyscript/blob/main/pyscriptjs/sr...

    [1] https://github.com/pyodide/pyodide

    [2] https://github.com/plasticityai/coldbrew

    [3] https://github.com/brython-dev/brython

  • wasm3

    🚀 The fastest WebAssembly interpreter, and the most universal runtime

    Thank you !

    This looks like a very interesting world to be apart of , I'll look at this tomorrow.

    https://github.com/wasm3/wasm3

  • NumPy

    The fundamental package for scientific computing with Python.

    > Why?

    This isn't good for most web use cases but there are some major new use cases that it enables.

    Pyodide is in Python documentation all over the place, for instance on https://numpy.org/

    Python has many libraries that JS is missing. Particularly the scientific computing ecosystem has a lot of very well supported Python packages but fewer JavaScript packages. They also can benefit a lot from connection to a UI.

    Two key use cases for this stuff are Python education and scientific computing. Students have a hard time installing Python locally. Generally scientists want to share their results broadly, but they probably did their analysis in Python.

    Here's another example of a good use case:

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts