Skip to main content

pgweb

pygame-ce in the browser with pyodide. Surfaces, draw, transform, image, font, freetype, mask, sprite, event, key, mouse and a WebAudio mixer. No window and no OpenGL from pygame: you present the surfaces yourself, for example with moderngl.

Setup

const pyodide = await loadPyodide()
await pyodide.loadPackage(['pgweb-0.9.0-cp314-cp314-pyemscripten_2026_0_wasm32.whl'])

const pgweb = pyodide.pyimport('pgweb')
eval(pgweb._extern_js)(pyodide, canvas, 320, 240)

Call it before import pygame. The last two arguments are the size the mouse positions map to.

Build

git submodule update --init
podman build . -o dist

dist/ gets the sdist and the wasm wheel.

License

pgweb is licensed under the LGPL-2.1, see LICENSE. Copyright (c) 2026 Szabolcs Dombi for the code in this repository, the bundled projects keep their own copyright.

The wheel bundles pygame-ce (LGPL-2.1), SDL, SDL_image and SDL_ttf (zlib) and FreeType (FTL). Their license texts are installed with the wheel in pgweb/licenses.

Games that load pgweb can use any license.

Metadata

Release files for pgweb 0.9.0

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

Source distribution (sdist)

Source distribution for pgweb 0.9.0
File Size Uploaded Provenance Actions
pgweb-0.9.0.tar.gz 6.2 MB Without provenance Details for pgweb-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pgweb 0.9.0
File Interpreter ABI Platform Actions
pgweb-0.9.0-cp314-cp314-pyemscripten_2026_0_wasm32.whl CPython 3.14 CPython 3.14 PyEmscripten 2026.0+ WebAssembly Details for pgweb-0.9.0-cp314-cp314-pyemscripten_2026_0_wasm32.whl

Total release size: 7.0 MB

Release files / pgweb-0.9.0.tar.gz

Download URL pgweb-0.9.0.tar.gz
Size 6.2 MB
Tags Source
SHA-256 checksum
How to use checksums
e7c57dc69672b1fadb22e3ecf87912dc681f221b24e33a7f0625b2226a4eea4a
BLAKE2b-256 checksum
How to use checksums
a450d9f98a51540398e41337e62a7bdd5c1adda33817f5606d61fec943a575a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Release files / pgweb-0.9.0-cp314-cp314-pyemscripten_2026_0_wasm32.whl

Download URL pgweb-0.9.0-cp314-cp314-pyemscripten_2026_0_wasm32.whl
Size 828.1 kB
Tags CPython 3.14 PyEmscripten 2026.0+ WebAssembly
SHA-256 checksum
How to use checksums
e8a87fd9e0df08bff942eaab1305390bfdd8111c31c0c4a0a591dfaf2101e5f6
BLAKE2b-256 checksum
How to use checksums
836073db049916daf39c273dbe001a93b8e7954bdd78eb2957c4f1133386c1df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.10

Security for pgweb 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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