PyScript
Available only in PyCharm Professional: download to try or compare editions
PyScript is a framework that allows you to create Python applications in the browser using HTML interface.
PyCharm provides basic code completion and validation for Python code in an HTML file written using PyScript.
note
PyScript is a new experimental technology, so it's expected to change. Check the latest updates in the PyScript repository on GitHub.
note
Python InterpreterYour Python code added with PyScript is going to be processed by the interpreter provided by the browser. The rendered HTML file in the browser will not use the Python interpreter from the PyCharm project.
In the HTML file, inside the
head
tag, add the followingscript
tag with the path to thepyscript.js
file:<script defer src="https://pyscript.net/alpha/pyscript.js"></script>
You can use the
pyscript.js
file hosted on the pyscript.net website, or you can store the file locally and provide the path to it on your machine.Add a
py-script
tag to the body of the HTML file.Add Python code to the
py-script
tag. PyCharm will highlight the Python code inside this tag and provide code completion.
For the complete list of the PyScript tags supported by PyCharm, see Supported PyScript tags.
When you've added Python code to the HTML file, you can preview the output in a browser. For more details on how to preview HTML files in PyCharm, see Viewing Pages with Web Contents.

Here is the list of PyScript tags supported by PyCharm:
Thanks for your feedback!