Skip to main content

Runtime Engine

PyWee has one runtime engine: Chromium.

There is no simple, browser, WebView, Qt, Electron, or system-browser backend. pywee run starts pywee-browser-engine, and that launcher starts the Chromium executable managed by PyWee. It is resolved first from package data when an offline bundled wheel is used, otherwise from the PyWee Chromium cache:

<pywee package>/_chromium/<platform>/...
<pywee cache>/<platform>/...

If managed Chromium is missing, PyWee downloads the locked artifact from chromium.lock.json. PyWee does not search PATH, does not call a host chromium binary, and does not fall back to a system browser.

Do not add a [runtime] table to pywee.toml; it is rejected because the runtime is not selectable.

Current implementation:

  • Chromium renders HTML/CSS/JavaScript/WebGL;
  • the active Python interpreter runs trusted <script type="python">;
  • the interim Python DOM host talks to the live Chromium page;
  • JavaScript remains available only when the app enables it.

Target implementation:

  • a Python runtime embedded directly in Chromium renderer processes;
  • native Python bindings to Chromium/Blink DOM/Web API objects;
  • no userland JS bridge as the Python DOM implementation.