Skip to main content

Python Web Engine for Chromium-based local applications.

Project description

PyWee

PyWee is a Python Web Engine built on Chromium for trusted local GUI applications. Applications use standard HTML and CSS, while frontend behavior can be written in Python through <script type="python">. JavaScript remains available when an application enables it.

PyWee uses one locked, package-managed Chromium runtime. It never searches for or falls back to a system browser. Chromium is downloaded automatically into the PyWee cache on first run, or explicitly with pywee chromium install. The runtime lock records browser identity, source provenance, per-platform artifact URLs, sizes, and SHA256 checksums for deterministic installation.

Install

Install PyWee from PyPI into the Python environment that should execute the application code:

python3 -m pip install pywee
pywee chromium install
pywee chromium verify

Create and run an application:

pywee init my-app
pywee run my-app

PyWee uses the interpreter environment that launches the CLI. Application dependencies declared in pywee.toml are installed into that same environment:

pywee pip my-app install-deps

There is no PyWee permission or filesystem sandbox for Python code. Python runs as trusted local application code with the OS permissions of the launching user.

Platform Status

Platform Release status
Linux x64 Tested by the runtime test suite and Chromium integration smoke test.
Linux ARM64 Locked artifact and packaging path are prepared; native ARM64 execution is not yet tested.
Windows x64 Locked artifact and runtime path are prepared; not tested yet.
macOS x64/ARM64 Locked artifacts are present; execution is not tested.

The normal PyPI wheel is platform-independent and downloads only the exact runtime selected for the host. A platform is considered tested only after its native Chromium smoke job passes; the presence of an entry in the lock file is not presented as execution validation.

CI exposes manual cross-platform archive audits for Linux ARM64 and Windows x64. These jobs verify download availability, SHA256, ZIP extraction, and the expected executable layout without incorrectly claiming native execution. The separate manual Linux offline-wheel job builds the browser-containing wheel and audits its exact metadata, generated credits, and static licenses.

Application Manifest

Every application has one pywee.toml in its root:

[app]
name = "Hello World"
entry = "web/index.html"
trusted = true

[window]
mode = "window" # window, fullscreen, borderless

[python]
enabled = true
requirements = []

[javascript]
enabled = false

Small applications may keep Python directly in HTML:

<strong id="status">starting</strong>

<script type="python">
from browser import document

document.querySelector("#status").textContent = "running from Python"
</script>

Repositories

  • Documentation contains installation, CLI, manifest, architecture, distribution, and roadmap documentation.
  • Examples contains complete runnable applications for controls, 3D visualization, OpenCV, charts, and simulation.
  • Runtime is this installable Python package.

The generated documentation is published at pywee.org. Its source is maintained in general/pywee.

Development

git clone https://gitlab.com/pywee/runtime.git
cd runtime
python3 -m pip install -e .
python3 -m unittest discover -s tests

Build and inspect release artifacts in an isolated build environment:

python3 -m pip install build twine
python3 -m build
python3 -m twine check dist/*
python3 -m build_support.release_audit dist

Project Layout

build_support/                  Locked Chromium artifact build support
src/pywee/                      Runtime package, CLI, browser host, and DOM wrappers
src/pywee/third_party_licenses/ Canonical Chromium provider licenses
tests/                          Unit and Chromium integration tests

License

PyWee is licensed under the GNU Lesser General Public License, version 3 only (LGPL-3.0-only). See LICENSE, NOTICE, and third-party runtime licenses.

Every downloaded or offline-bundled Chromium directory contains the complete top-level Chromium license, the Playwright provider license and attribution, generated CHROMIUM_CREDITS.html, and exact artifact metadata. Verify this evidence with pywee chromium verify.

Copyright (C) 2026 Patrik Kratochvíl patrik@kratochvil.technology.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

pywee-0.1.0-1-py3-none-any.whl (83.0 kB view details)

Uploaded Python 3

File details

Details for the file pywee-0.1.0-1-py3-none-any.whl.

File metadata

  • Download URL: pywee-0.1.0-1-py3-none-any.whl
  • Upload date:
  • Size: 83.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.5

File hashes

Hashes for pywee-0.1.0-1-py3-none-any.whl
Algorithm Hash digest
SHA256 a2c440d06c0f7867fd216424add92222f4b1df908ad9f722a1b940fc3c127bcf
MD5 b1b46d9cf35a7a08069ffd8eda295d2a
BLAKE2b-256 1f01f2a62ca9fa7d0d8ce28293b989ed1a885a2454303d853e158e84cb5abe73

See more details on using hashes here.

Supported by

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