Express your creativity in Python through simple PyPen sketches!
PyPen tries to be the end-all solution to creative coding in Python. It provides very easy-to-use functions for drawing primitives to the screen and getting user input.
We felt like there was always a bunch of overhead needed to get nice and simple HTML-canvas-like graphics to work in Python and that this overhead always made for a half-baked user experience.
PyPen is basically doing all of the boring stuff in the background and exposes simple functions like clear(), circle(x, y, radius), rectangle(x, y, width, height) and many more for you to use and express your creativity with.
Checkout our setup tutorial: How do I Use PyPen
TL;DR:
- type
pip install pypenand follow instructions if any extra dependencies are needed. - type
pypen --init example, which will create a file named example.py in your current directory.
The example.py file will look like this:
from pypen import *
def start():
settings.fps = 60
def update():
fill_screen("orange")
rectangle(20, 20, 300, 400, "red")- type
pypen exampleand a window should popup with something looking like this: - edit the example.py file by checking out PyPen's documentation and examples
| Example 002 | Example 003 |
|---|---|
![]() |
![]() |
| Example 006 | Example 007 |
|---|---|
![]() |
![]() |
| Example 010 | Example 011 |
|---|---|
![]() |
![]() |
We have an entire page dedicated to explaining the inner workings of PyPen. If you are a developer interested in helping PyPen's development, you should check it out: How does PyPen Really Work?







