Skip to main content
A simpler way to build desktop GUIs

Python Web Engine

Design your interface in HTML and CSS, then wire its controls directly to Python. PyWee keeps the GUI and Python together in one trusted local app—no separate backend service or custom API between your screen and your logic.

$python3 -m pip install pyweeGUI and logic together.
pywee://pid-simulator
main.pyindex.html
from browser import document self.simulate_button = document.querySelector("#simulate")self.chart = document.querySelector("#chart") def render(self, event=None):  samples = self.simulator.run(self.parameters())  self.chart.innerHTML = self._svg(samples) self.simulate_button.addEventListener("click", self.render)
Direct Python controls
01 Connect the interface
Py

The features make sense when you see them work.

Each runnable example demonstrates one part of the same idea: use the web to design the interface and use Python to make it behave.

pywee://controls
Component catalogPython frontend controls
Python running
Text inputName field
Operator
Operator
SliderIntensity
72%
TogglesState switches
Enabled
armed
ButtonsActions
ApplyReset
Applied 3 times
01 · Direct controls

Add a control in HTML. Handle it directly in Python.

Use an ordinary input, button, select, or slider. Find it from Python, attach an event listener, and update its state—without creating a backend endpoint or learning a custom widget toolkit.

Sourcemain.py
slider = document.querySelector("#intensity-slider")
output = document.querySelector("#intensity-output")

def render(event=None):
    output.textContent = f"{slider.value}%"

slider.addEventListener("input", render)
Open the controls example
pywee://tic-tac-toe
GameTic-tac-toe against Python
Python running
Your turnMake your move.

Python responds with a minimax opponent.

New game
XOXOX
02 · Web-native design

Design the whole experience with HTML and CSS.

The board, typography, visual states, and responsive layout are normal web design. Python stays focused on the game state, win detection, DOM events, and the minimax opponent.

Sourcemain.py
self.cells = document.querySelectorAll(".cell")

for cell in self.cells:
    cell.addEventListener("click", self.play)

def play(self, event):
    index = int(event.currentTarget.dataset.index)
    self.board[index] = "X"
    self.render()
Open the tic-tac-toe example

From a quick tool to a complete desktop experience.

PyWee is made for trusted applications: internal tools, dashboards, control panels, visualizations, simulations, and interfaces that need direct access to the Python ecosystem. A managed Chromium runtime keeps rendering predictable across installations.

See how the runtime works
01Tools & utilities
02Data & dashboards
03Control interfaces
04Creative experiments

Build the interface. Wire it straight to Python.

Read the guide