Published unlisted
Edited
May 3, 2022
8 stars
Insert cell
Insert cell
<link rel="stylesheet" href="https://pyscript.net/alpha/pyscript.css" />
Insert cell
// Can't register the element twice. Can't unregister either.
pyscript = (pyodide,
window.__pyscript ||
fetch("https://pyscript.net/alpha/pyscript.js")
.then((r) => r.text())
.then((s) => (window.__pyscript = new Function(`${s}; return app`)())))
Insert cell
pyodide = require("https://cdn.jsdelivr.net/pyodide/v0.20.0/full/pyodide.js")
Insert cell
(pyodide, window.loadPyodide)
Insert cell
html = htl.html
Insert cell
(pyscript, html`<py-script> print('Hello, World!') </py-script>`)
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more