<!-- To install pyscrip put this in side your html head tag -->
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
Guys this is super cool
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
<py-script>print("hi pyscript world")</py-script>
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.
<!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" />
<title>PyScript</title>
<!-- styles and script dependencies -->
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
</head>
<body>
<!-- title -->
<h3>Testing python code in HTML</h3>
<!-- python code -->
<py-script> print('Now you can!') </py-script>
</body>
</html>
PyScript is a framework that allows users to create rich Python applications
in the browser using HTML’s interface. PyScript aims to give users a
first-class programming language that has consistent styling rules,
is more expressive, and is easier to learn.
<link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />
<script defer src="https://pyscript.net/latest/pyscript.js"></script>
<!doctype HTML>
<html>
<head>
<title>demo</title>
<meta charset="UTF-8">
<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>
</head>
<body>
<py-script> print('Hello world!') </py-script>|
</body>
</html>
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
PyScript currently implements the following elements:
<py-script> 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 </py-script>
<py-repl> creates a REPL component that is rendered to the page as
a code editor and allows users to write executable code </py-repl>