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.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl'])
const pgweb = pyodide.pyimport('pgweb')
eval(pgweb._extern_js)(pyodide, canvas)
Call it before import pygame.
Build
git submodule update --init
podman build . -o dist
dist/ gets the sdist and the wasm wheel.
Examples
podman build . -f docs/Containerfile -t pgweb-docs && podman run --rm -p 8000:80 pgweb-docs
Builds the wheel from this checkout and serves examples/ at http://localhost:8000/.
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.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pgweb-0.9.1.tar.gz | 6.2 MB | Without provenance | Details for pgweb-0.9.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pgweb-0.9.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl | CPython 3.14 | CPython 3.14 | PyEmscripten 2026.0+ WebAssembly | Details for pgweb-0.9.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl |
Total release size: 7.0 MB
Release files / pgweb-0.9.1.tar.gz
| Download URL | pgweb-0.9.1.tar.gz |
|---|---|
| Size | 6.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9859427d167c3a139d41bbaf3208050cfa166e8c22c8583bab55e63701492101
|
|
BLAKE2b-256 checksum How to use checksums |
363bfa1e2a5ab6ae0934252561484713fb657984ad2903fb2c18e5bb0fc3b006
|
| 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.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl
| Download URL | pgweb-0.9.1-cp314-cp314-pyemscripten_2026_0_wasm32.whl |
|---|---|
| Size | 828.2 kB |
| Tags | CPython 3.14 PyEmscripten 2026.0+ WebAssembly |
|
SHA-256 checksum How to use checksums |
786fcc6fcfc7ed173620749cf8f40b635140b081675752c600e7c27b79a051f8
|
|
BLAKE2b-256 checksum How to use checksums |
594383940b977dbf65a7aba2cf519dbf0289ede41e5409b5899a35d385a7e803
|
| 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.1
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.