PyScript is a framework that allows users to create rich Python applications in the browser using HTML's interface and the power of Pyodide, WASM, and modern web technologies. The PyScript framework provides users at every experience level with access to an expressive, easy-to-learn programming language with countless applications.
The PyScript library provides HTML tags for embedding and executing Python code in your browser. PyScript is built using Pyodide, the WebAssembly port of CPython, which is compiled using Emscripten.
In this application the <py-script> HTML tag will be used to define a function that performs DOM manipulation
<py-script></py-script>
In this application we use the py-click attribute to handle mouse clicks on the submit button on the page. The py-click attribute is a special attribute that allows you to specify a Python function that will be called when the submit button is clicked.
In this application the py-click attribute will call a function that will store the form values in Py-Script variables and them write them out to the DOM.
py-click="sub()"