Which is executable via web browsers and developer-friendly as easy to integrate inside HTML
As developers, we are always curious to test out the new technologies and engage with them.
What is PyScript
PyScript is a new Framework powered by Pyodide and Web Assembly that allows us to run python in web browsers. It's useful for web developers to run python in the browser, write custom logic, and enhance the application's features and functionalities.
PyScript is not yet fully ready. It is still in the beta phase and not recommended for production applications.
How PyScript Work
How to Run PyScript
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" /> <script defer src="https://pyscript.net/alpha/pyscript.js"></script> <title>pyscript</title> </head> <body> <h2>Hello World</h2> <py-script> print('Now you can!')</py-script> </body> </html>
Advantages of PyScript
PyScript will definitely be adding more power to python developers. It will surely add more value to their work and make things easier.
There are a lot more. You can use the popular python libraries
My thoughts about PyScript
My First impression of PyScript was broken. When I tested it on my local machine for the first time, it took a long time to display the web page. If you face any network issues or have a slow internet connection, it will not display the written python script.