Pytml

Pytml is a 15KB lightweight PyScript alternative — run Python in HTML with one script tag.

git clone https://github.com/notamitgamer/Pytml.git
· rebuilt hourlyOpen on GitHub
root / examples / numpy.html

numpy.html (337B)


      1 <!DOCTYPE html>
      2 <html><head><meta charset="utf-8"><title>Pytml NumPy</title><script src="https://pytml.vercel.app/pytml.js"></script></head>
      3 <body><h1>NumPy</h1><pre id="out">Loading…</pre>
      4 <py1>
      5 import micropip
      6 await micropip.install("numpy")
      7 import numpy as np
      8 out.text = str(np.mean(np.array([1, 2, 3, 4, 5])))
      9 </py1></body></html>