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.
Core Modules
Section titled “Core Modules”| Module | Description |
|---|---|
| display | Create and manage the display surface |
| Surface | 2-D image stored as a NumPy RGBA pixel buffer |
| Rect / FRect | Rectangle classes for positioning and collision |
| Color | RGBA color with rich conversion support |
| draw | Shape-drawing functions |
| event | Event queue and input events |
| font | TrueType font rendering |
| image | Image loading and saving |
| time | Clock and timing utilities |
| key | Keyboard state and key constants |
| mouse | Mouse state and cursor |
| Mask | Bitmask for pixel-perfect collision |
| transform | Surface transformations (scale, rotate, blur, …) |
| sprite | Sprite and Group classes |
| math | Vector2 and Vector3 |
Additional Modules
Section titled “Additional Modules”| Module | Description |
|---|---|
| gfxdraw | Anti-aliased and filled primitives |
| surfarray | NumPy array access to pixel data |
| pixelcopy | Low-level pixel copy utilities |
| constants | All pygame constants (keys, events, flags) |
Stub Modules
Section titled “Stub Modules”These modules exist for import compatibility but raise
NotImplementedError when used.
| Module | Description |
|---|---|
| camera | Camera capture (not available in Jupyter) |
| cursors | Hardware cursors |
| freetype | FreeType font rendering |
| midi | MIDI input / output |
| sndarray | Sound sample arrays |