Write Python sketches with a p5.js-style canvas API — no installs, no setup. Draw shapes, animate, respond to mouse and keyboard, and share your work instantly.
createCanvas(400, 400)
t = 0
while True:
background(30)
for i in range(12):
x = 200 + cos(t + i * TWO_PI / 12) * 100
y = 200 + sin(t + i * TWO_PI / 12) * 100
fill(i * 20, 100, 220)
circle(x, y, 24)
t += 0.03
animate()
The same drawing primitives, colour system, and animation loop you know from p5.js — just written in Python.
Browse the reference →Powered by Pyodide — real CPython running in WebAssembly. Open a browser, start coding. Nothing to download.
Courses, assignments, and a public gallery. Students share their work, teachers review submissions — all in one place.
Free to use. No credit card. Just open the editor and write Python.
Create a free account