Skip to content

API Reference

This section contains the auto-generated API reference for every public module in ipygame.

ipygame re-implements the pygame-ce API on top of ipycanvas so your games can run inside Jupyter notebooks.

ModuleDescription
displayCreate and manage the display surface
Surface2-D image stored as a NumPy RGBA pixel buffer
Rect / FRectRectangle classes for positioning and collision
ColorRGBA color with rich conversion support
drawShape-drawing functions
eventEvent queue and input events
fontTrueType font rendering
imageImage loading and saving
timeClock and timing utilities
keyKeyboard state and key constants
mouseMouse state and cursor
MaskBitmask for pixel-perfect collision
transformSurface transformations (scale, rotate, blur, …)
spriteSprite and Group classes
mathVector2 and Vector3
ModuleDescription
gfxdrawAnti-aliased and filled primitives
surfarrayNumPy array access to pixel data
pixelcopyLow-level pixel copy utilities
constantsAll pygame constants (keys, events, flags)

These modules exist for import compatibility but raise NotImplementedError when used.

ModuleDescription
cameraCamera capture (not available in Jupyter)
cursorsHardware cursors
freetypeFreeType font rendering
midiMIDI input / output
sndarraySound sample arrays