Security News > 2022 > May > New PyScript project lets you run Python programs in the browser
The new PyScript project lets you embed Python programs directly in HTML pages and execute them within the browser without any server-based requirements.
"PyScript is a framework that allows users to create rich Python applications in the browser using a mix of Python with standard HTML." explains Anaconda in a recent blog post.
While the Pyodide project previously allowed you to run Python in the browser, it takes some time to get used to the syntax and is not as elegant as simply writing a Python program and pasting it into your HTML page.
PyScript acts as a wrapper, allowing you to embed Python code directly between py-script tags and have it automatically executed by Pyodide.
The following illustrates a small Hello World example using PyScript and its execution directly in the browser.
While JavaScript can already perform almost everything you would want to create using PyScript, with Python considered the most popular programming language, PyScript opens the door for many interesting projects down the road. To get started with PyScript, you can visit their GitHub project page, which also includes numerous code examples.