Skip to main content

Example Apps

The applications live in the standalone examples repository. Clone it before running the commands on this page:

git clone https://gitlab.com/pywee/examples.git
cd examples

All examples are trusted local apps with their own pywee.toml. Each example has an assets/ directory; shared project assets are linked from the top-level assets/ directory.

The examples intentionally keep JavaScript disabled unless an app is meant to show JavaScript compatibility. They are primarily demonstrations of Python driving the frontend.

examples/hello-world

Small inline-Python example. It shows that Python can update DOM text and run a background timer.

pywee run examples/hello-world

examples/controls

Copyable control components. Each component fragment carries its own HTML, CSS, and Python behavior. This is intentionally simple and demonstrates that inline Python can be practical for small UI parts.

pywee run examples/controls

examples/3d-viewer

CSS 3D object viewer controlled by Python modules in python/. It includes rotation, zoom, reset, and auto-spin controls.

pywee run examples/3d-viewer

examples/tic-tac-toe

Tic-tac-toe game against a Python minimax opponent.

pywee run examples/tic-tac-toe

examples/camera-cv2

OpenCV camera viewer. It requires opencv-python in the Python environment that launches PyWee.

pywee pip examples/camera-cv2 install-deps
pywee run examples/camera-cv2

The app shows a clear fallback message when OpenCV or camera device access is not available.

examples/sine-table-chart

Editable sine sample table with a live Python-generated SVG chart.

pywee run examples/sine-table-chart

examples/pid-simulator

PID controller simulator. Python runs the simulation and renders an SVG response chart while the user changes P, I, D, and setpoint values.

pywee run examples/pid-simulator