webpy
Make a website with plain pygame. webpy streams your pygame window to any browser tab.
pip install webpygame
import webpy
screen = webpy.display.set_mode((800, 500))
clicks = 0
button = webpy.Rect(300, 220, 200, 60)
while True:
for event in webpy.event.get():
if event.type == webpy.MOUSEBUTTONDOWN and button.collidepoint(event.pos):
clicks += 1
screen.fill((30, 34, 48))
webpy.draw.rect(screen, (90, 94, 235), button, border_radius=12)
webpy.display.flip() # sends the frame to the browser
Run it, and your browser opens. Every browser tab gets its own copy of your site.
webpy.display.url(): the address for other computers on your networkwebpy.display.public(): a public link that works from anywhere (uses Cloudflare's freecloudflared)webpy.display.set_url("/about"): change the address barwebpy.settings: change defaults (public,share,separate_tabs,max_tabs,fps, ...)
Everything from pygame is available as webpy.something too.
Metadata
Release files for webpygame 1.0.0
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 |
|---|---|---|---|---|
| webpygame-1.0.0.tar.gz | 14.3 kB | Without provenance | Details for webpygame-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| webpygame-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for webpygame-1.0.0-py3-none-any.whl |
Total release size: 28.2 kB
Release files / webpygame-1.0.0.tar.gz
| Download URL | webpygame-1.0.0.tar.gz |
|---|---|
| Size | 14.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a81d44d20a76fff99cfde6bb89501cd551b1b6bcbbbb7e5f59dfd786be9b5d40
|
|
BLAKE2b-256 checksum How to use checksums |
ea05695faab403a0e23bf5d3ece24690505c277ce18ce3b7d575f58e7380b82d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / webpygame-1.0.0-py3-none-any.whl
| Download URL | webpygame-1.0.0-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11038d577b941aca2f9275061907324dd810c624edaf6555b9340c02ef94dc59
|
|
BLAKE2b-256 checksum How to use checksums |
4a28ad4398e4b67cd5d05b0e443af77fb4db53521977ed5b5d107e86cf02b871
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Security for webpygame 1.0.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.