Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Wasabi 2D

PyPI PyPI - Python Version PyPI - Wheel

Discord

A fast, cutting-edge 2D game engine for Python.

Current features include:

Wasabi2D is based on moderngl(supports OpenGL 4.1+), with pygame 2.0 for some supporting functions, and supporting APIs ported from Pygame Zero.

Docs and Help

Documentation is available at https://wasabi2d.readthedocs.io/

Join us on Discord for help and announcements!

Quick example

Draw a drop-shadowed circle that follows the mouse:

import wasabi2d as w2d

scene = w2d.Scene()
scene.background = 0.9, 0.9, 1.0

scene.layers[0].set_effect('dropshadow')
circle = scene.layers[0].add_circle(
    radius=30,
    pos=(400, 300),
    color='red',
)

@w2d.event
def on_mouse_move(pos):
    circle.pos = pos

w2d.run()

Output of the above program

Installation

Use pip to install Wasabi2d from PyPI:

pip install wasabi2d

Please make sure your requirements.txt pins a major version, as Wasabi2D may continue to make breaking API and graphical changes in major versions.

Screenshots

This screenshot shows off polygons, sprites, text and particle effects:

Screenshot as of Wasabi2d 1.0.0

Roller Knight was an entry in PyWeek 28, written with Wasabi2D by Daniel Pope and Larry Hastings:

Roller Knight screenshot

Spire of Chaos was another entry in PyWeek 28 written with Wasabi2D by Daniel Moisset:

Spire of Chaos screenshot

Development and releases

Use Python 3.12 or later for the development and documentation tools:

uv venv
uv pip install -e . -r requirements-dev.txt
.venv/bin/python -m pytest
.venv/bin/sphinx-build -b html docs docs/_build/html
uv build

Git tags are the source of version numbers. uv build invokes flit_scm, which uses setuptools_scm to generate wasabi2d/__version__.py; do not edit or commit that generated file. Reinstall the editable package after switching revisions to refresh it. The wheel and Sphinx docs use the same version metadata. Building from an sdist also works without Git.

To release, publish a GitHub Release with a new PEP 440 version tag targeting master (for example, v1.5.0a2 or v1.5.0). Mark alpha, beta, release candidate, and development releases as prereleases. For development tags use .dev0, which allows setuptools_scm to number subsequent commits. Write the release notes in GitHub; the Sphinx changelog reads them automatically. A pushed version tag also runs the release workflow.

The Release workflow builds and validates the distributions before publishing them to PyPI. Configure either a PYPI_TOKEN repository secret containing a project-scoped PyPI API token, or a PyPI trusted publisher for owner lordmauve, repository wasabi2d, workflow release.yml (no environment). Failed uploads can be retried using Run workflow with the existing tag; already uploaded files are skipped. Never move a published tag.

The Backfill releases workflow creates only missing historical GitHub Releases, using .github/release-history.json, and creates the development test release. It does not republish historical versions to PyPI. Their release notes retain the original PyPI dates because GitHub's publication dates cannot be backdated.

Public documentation builds can read the changelog anonymously. To avoid GitHub API rate limits, set SPHINX_GITHUB_CHANGELOG_TOKEN in the documentation build environment; Actions supplies its token automatically.

Release files for wasabi2d 1.5.0a2.dev0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wasabi2d 1.5.0a2.dev0
File Size Uploaded
wasabi2d-1.5.0a2.dev0.tar.gz 9.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for wasabi2d 1.5.0a2.dev0
File Interpreter ABI Platform
wasabi2d-1.5.0a2.dev0-py3-none-any.whl Python 3 none any Details

Total release size: 10.1 MB

Release files / wasabi2d-1.5.0a2.dev0.tar.gz

Download URL wasabi2d-1.5.0a2.dev0.tar.gz
Size 9.8 MB
Tags Source
SHA-256 checksum
How to use checksums
c0788397a10a145ed38a5e76a5accc350b10f28880407d2daafb10b362544a6b
BLAKE2b-256 checksum
How to use checksums
e1fbe3d78bc6ccfa62fc529ba7497ef4d680007f6062e1a6beb93c234a69654a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / wasabi2d-1.5.0a2.dev0-py3-none-any.whl

Download URL wasabi2d-1.5.0a2.dev0-py3-none-any.whl
Size 315.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6cd23a0cac6fc98a0b9b72257ddac5428d454261c9ff57a46982d0e5a95379ec
BLAKE2b-256 checksum
How to use checksums
a722e78f5824a3235427fd2f0c7cf9ad36fe7f8aa0c6e0b9fb5f98268f8f0bfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

1.5.0a2.dev0 This release

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page