Skip to main content
Pre-release

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

pygodide

PyPI Python versions Downloads CI License: MIT

Docs Ruff

pygodide turns Pygame projects into browser apps using Pyodide with one command, no edits to your source code, and achieving 2.5x more FPS than pygbag (in certain cases).

Pronounced "pie-go-died"

pygodide in-browser loading screen, then a pygame snake game starting FPS benchmark: pygodide 453 vs pygbag 180 on perf_bench

Loading screen | FPS vs pygbag

Documentation

Quick Start

From your project's root directory, run the following commands:

Install

# Or add to your pyproject.toml and `uv sync`
pip install pygodide

Build

# Produces the web-hostable build/ directory
pygodide build .

# For an itch.io zip file
pygodide build . --zip

Serve

# Hosts the build/ directory locally
pygodide serve .

Open http://localhost:8000 in your browser.

Troubleshooting

If anything went wrong, work through the instructions page first (config, async, smoke tests, and common failures).

If you still cannot get your game running in the browser, open a "My project didn't convert" issue so we can improve pygodide for everyone. Paste build/pygodide-build.log into the form.

Examples and Live Demos

Sample projects live under test_targets/, and a few of them are uploaded to itch.io.

Try one locally:

git clone https://github.com/Elan456/pygodide.git
cd pygodide
pip install pygodide

pygodide build test_targets/ball_bouncing
pygodide serve test_targets/ball_bouncing

Before every release, each target under test_targets/ is automatically verified using a headless browser to catch regressions. All features shown in the test targets are maintained as first-class features.

Contributing

git clone https://github.com/Elan456/pygodide.git
cd pygodide
uv sync --dev
uv run playwright install chromium
uv run pre-commit install --hook-type pre-commit --hook-type pre-push

The dev group includes pygodide[smoke], so Playwright is installed with uv sync --dev. You still need playwright install chromium once for browser binaries.

Run the same checks as CI:

uv run ruff format --check .
uv run ruff check .
uv run pytest

Smoke tests (from this repo)

uv run playwright install chromium   # once
uv run pygodide smoke /path/to/your/pygame/project
uv run pygodide smoke test_targets --suite

Be sure to read AGENTS.md; it is written for both human contributors and AI tools.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pygodide-0.1.0b15.tar.gz (524.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pygodide-0.1.0b15-py3-none-any.whl (66.0 kB view details)

Uploaded Python 3

File details

Details for the file pygodide-0.1.0b15.tar.gz.

File metadata

  • Download URL: pygodide-0.1.0b15.tar.gz
  • Upload date:
  • Size: 524.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pygodide-0.1.0b15.tar.gz
Algorithm Hash digest
SHA256 0c066ae676ec83e093ce5adfeff49db3ff2819d02f7c4cdfc3d06454c4506731
MD5 4b97657fe16225ba2f296de05c24bf85
BLAKE2b-256 1d07ca76d3f9a503656f7c3d0d322b5bd1cdd5636b18e3f3a007357559c55f1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygodide-0.1.0b15.tar.gz:

Publisher: publish.yml on Elan456/pygodide

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pygodide-0.1.0b15-py3-none-any.whl.

File metadata

  • Download URL: pygodide-0.1.0b15-py3-none-any.whl
  • Upload date:
  • Size: 66.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pygodide-0.1.0b15-py3-none-any.whl
Algorithm Hash digest
SHA256 c078b4db122bd8a1e65828e61119a09d3635a857056f9f602fb9b09734775e9b
MD5 8f0f01b581ca6caaa67997dee0da3607
BLAKE2b-256 16c740c63171ad3c79860011afa2e94e4474b91395b0a9158c8c39fd1dd97b5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygodide-0.1.0b15-py3-none-any.whl:

Publisher: publish.yml on Elan456/pygodide

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page