JavaScript? Start PyScript now in your HTML

PyScript is a meta project that aims to combine multiple open technologies into a framework that allows users to create sophisticated browser applications with Python. It integrates seamlessly with the way the DOM works in the browser and allows users to add Python logic in a way that feels natural both to web and Python developers.

Try PyScript

<link rel="stylesheet" href="" />
<script defer src=""></script>
  • <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-repl>: creates a REPL component that is rendered to the page as a code editor and allows users to write executable code

New Version Has a Better Initialization EX


<div id="temp_test">


    <py-script output="temp_test">
import pandas as pd
a = pd.read_csv('./test.csv')
<link rel="stylesheet" href="" />
<script defer src=""></script>
- pandas
- paths:
- ./test.csv
from datetime import datetime
now =
<py-repl id="my-repl" auto-generate="true"></py-repl>



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store