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 / matplotlib.html

matplotlib.html (379B)


      1 <!DOCTYPE html>
      2 <html><head><meta charset="utf-8"><title>Pytml Matplotlib</title><script src="https://pytml.vercel.app/pytml.js"></script></head>
      3 <body><h1>Matplotlib</h1><div id="plot"></div>
      4 <py1>
      5 import micropip
      6 await micropip.install("matplotlib")
      7 import matplotlib.pyplot as plt
      8 
      9 plt.plot([1, 2, 3, 4], [1, 4, 2, 5])
     10 plt.title("Pytml chart")
     11 plt.show()
     12 </py1></body></html>