PyWee App Manifest
Every PyWee app is configured by one pywee.toml file in the application root.
The manifest is the single project configuration file used by pywee run,
pywee validate, pywee pip, and pywee build.
PyWee does not use requirements.txt files in example apps. Python package
requirements belong directly in [python].requirements.
Minimal App
[app]
name = "Hello World"
entry = "web/index.html"
trusted = true
[window]
mode = "window"
[python]
enabled = true
requirements = []
[javascript]
enabled = false
entry paths are always relative to the app root. Absolute paths and paths that
escape the app root with .. are rejected.
Full Shape
[app]
name = "Robot Vision Tool"
id = "cz.example.robot-vision"
version = "0.1.0"
entry = "web/index.html"
trusted = true
[window]
title = "Robot Vision Tool"
width = 1280
height = 800
resizable = true
mode = "window"
[python]
enabled = true
version = "3.13"
entry = "python/main.py"
requirements = [
"numpy",
"opencv-python>=4",
]
[python.scripts]
allowed_types = ["python", "text/python", "application/python"]
[javascript]
enabled = false
[build]
bundle_python = true
[app]
[app] is required.
| Key | Type | Required | Default | Meaning |
|---|---|---|---|---|
name | string | yes | none | Human-readable application name. |
entry | path string | yes | none | HTML entry file relative to the app root. |
id | string | no | none | Stable application identifier. |
version | string | no | none | Application version. |
trusted | boolean | no | false | Allows local Python execution when [python].enabled = true. |
Python requires trusted = true. PyWee must not execute system Python for
ordinary remote web pages.
[window]
[window] is optional.
| Key | Type | Required | Default | Meaning |
|---|---|---|---|---|
title | string | no | app/browser default | Window title override. |
width | positive integer | no | 1280 | Initial window width. |
height | positive integer | no | 800 | Initial window height. |
resizable | boolean | no | true | Whether the window can be resized. |
mode | string | no | "window" | One of "window", "fullscreen", or "borderless". |
mode = "window" uses a normal desktop window. fullscreen starts without
window chrome and fills the display. borderless starts an app-like window
without normal browser decorations.
[python]
[python] is optional. Python is disabled unless enabled = true.
| Key | Type | Required | Default | Meaning |
|---|---|---|---|---|
enabled | boolean | no | false | Enables <script type="python"> and optional Python entry execution. |
version | string | no | current interpreter | Optional interpreter version check for commands that prepare an app environment. |
venv | path string | no | none | Legacy app venv path for compatibility commands. The browser runtime uses the Python environment that launched pywee. |
entry | path string | no | none | Python file executed after HTML Python script tags unless that same file is already loaded by the HTML. |
requirements | string array | no | [] | Pip requirement specifiers installed by pywee pip <app> install-deps. |
Examples:
[python]
enabled = true
requirements = []
[python]
enabled = true
requirements = ["numpy", "opencv-python>=4", "pydantic==2.11.7"]
requirements is not a file path. This is invalid:
[python]
requirements = "requirements.txt"
Move old requirements.txt lines into the array and delete the text file:
numpy
opencv-python>=4
becomes:
[python]
requirements = [
"numpy",
"opencv-python>=4",
]
[python.scripts]
[python.scripts] is optional.
| Key | Type | Required | Default | Meaning |
|---|---|---|---|---|
allowed_types | non-empty string array | no | ["python", "text/python", "application/python"] | Script type values treated as Python. |
PyWee supports:
<script type="python">
from browser import document
document.querySelector("#status").textContent = "ready"
</script>
and:
<script type="python" src="../python/main.py"></script>
Inline Python is app code. Use it for small examples and simple components;
move larger logic into .py files when the script becomes hard to read.
[javascript]
[javascript] is optional.
| Key | Type | Required | Default | Meaning |
|---|---|---|---|---|
enabled | boolean | no | true | Allows ordinary browser JavaScript scripts. |
Set enabled = false for examples that intentionally show a Python-only
frontend.
[build]
[build] is optional.
| Key | Type | Required | Default | Meaning |
|---|---|---|---|---|
bundle_python | boolean | no | true | Prototype build flag that asks pywee build to include the current Python runtime files when the platform supports it. |
This flag affects PyWee application packaging. It does not change how pywee run
loads Python during development.
bundle_python = true means: when pywee build can discover the host Python
runtime files for the target platform, include them in the prototype archive.
It does not create a separate virtual environment and it does not install
requirements. Install or vendor application dependencies before building.
Unsupported Tables
Do not add these tables:
[runtime]
engine = "chromium"
[permissions]
filesystem = ["./data"]
PyWee is Chromium-only and always uses the managed Chromium runtime resolved from package data or the PyWee runtime cache. There is no selectable runtime backend.
PyWee also does not implement a manifest permission layer. Python is trusted
local application code and has the normal operating-system access of the user or
process that launched it. Restricting filesystem, network, subprocess, camera,
serial, or DDS access belongs to the operating system or the process launcher,
not to pywee.toml.