DEV Community

jmau111
jmau111

Posted on • Updated on

Do you want to use PyScript?

Python in the browser?

The authors describe the project as the following:

combine multiple open technologies into a framework that allows users to create sophisticated browser applications with Python

Indeed, Python is easy to learn and use, and there are many helpful packages.

With Pyscript, you can add Python code in your HTML pages:

: can be used to define python code that is executable within the web page. The element itself is not rendered to the page and is only used to add logic
: creates a REPL component that is rendered to the page as a code editor and allows users to write executable code

They have a dedicated website and practical examples if you're interessed by the initiative.

I'm a bit skeptical. It's actually not the first time someone wants to include Python in the browser, for example, brython has tried something similar.

Let's skip the security aspect and the performances. I wonder why they choose this approach and not WebAssembly like Pyodide does.

Do you have any clue?

Discussion (0)