Skip to main content

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.

KeyTypeRequiredDefaultMeaning
namestringyesnoneHuman-readable application name.
entrypath stringyesnoneHTML entry file relative to the app root.
idstringnononeStable application identifier.
versionstringnononeApplication version.
trustedbooleannofalseAllows 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.

KeyTypeRequiredDefaultMeaning
titlestringnoapp/browser defaultWindow title override.
widthpositive integerno1280Initial window width.
heightpositive integerno800Initial window height.
resizablebooleannotrueWhether the window can be resized.
modestringno"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.

KeyTypeRequiredDefaultMeaning
enabledbooleannofalseEnables <script type="python"> and optional Python entry execution.
versionstringnocurrent interpreterOptional interpreter version check for commands that prepare an app environment.
venvpath stringnononeLegacy app venv path for compatibility commands. The browser runtime uses the Python environment that launched pywee.
entrypath stringnononePython file executed after HTML Python script tags unless that same file is already loaded by the HTML.
requirementsstring arrayno[]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.

KeyTypeRequiredDefaultMeaning
allowed_typesnon-empty string arrayno["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.

KeyTypeRequiredDefaultMeaning
enabledbooleannotrueAllows ordinary browser JavaScript scripts.

Set enabled = false for examples that intentionally show a Python-only frontend.

[build]

[build] is optional.

KeyTypeRequiredDefaultMeaning
bundle_pythonbooleannotruePrototype 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.