Build web apps in typed Python — one tree, a DOM renderer, two execution modes (WASM + server).
Project description
tempestweb
📚 Documentation: Português (Brasil) · English (US) — bilingual docs site (PT-BR default + EN-US), deployed to GitHub Pages.
Build web apps in typed Python. One declarative widget tree, a DOM renderer, and two execution modes that share 100% of the application code: Mode A (WASM) runs your Python in the browser via Pyodide; Mode B (server) runs it on the server (FastAPI) and talks to a thin JS client over WebSocket or SSE. Installable PWA, offline-first (service worker + IndexedDB), and WebPush are first-class — parity with
tempest-react-sdk.
Sister project to tempestroid — same "one tree, multiple renderers" architecture. The renderer-agnostic engine (IR, reconciler, state, style, widgets) is shared; tempestweb adds a DOM leaf renderer (pure JavaScript, no framework, no build step, no TypeScript) and two patch transports.
Status
🚧 Early construction. See the design docs:
docs/plan.md— full design and phase plan.docs/roadmap.md— phase checklist.docs/arquitetura.md— architecture.docs/contract.md— the Python↔client wire format.docs/agents/MANIFEST.md— parallel agent task plan.
Want runnable apps? Browse the Example Gallery (PT-BR) — 35 single-concept demos (stopwatch, forms, data table, kanban, chat, theming, i18n, canvas, native capabilities, observability, PWA/WebPush, and a server-mode walkthrough), each running unchanged in both modes.
How it works
view(app) ──build──▶ Node tree (IR) ← shared core (vendored from tempestroid)
│
diff
▼
[ Patch ] insert / remove / update / reorder / replace
╱ ╲
Mode A transport Mode B transport
(pyodide.ffi) (WebSocket | SSE)
╲ ╱
client/ (pure JS): apply patches to the DOM
+ Style→CSS + event capture ← same code in both modes
The application's view() never names a transport — the same examples/counter/app.py
runs under --mode wasm and --mode server unchanged. Capabilities (native/:
http, audio, share, geolocation, clipboard, storage, camera) are typed awaitables
with the same Python API in both modes — Mode A calls the Web API in-process, Mode
B proxies it over a round-trip (see docs/contract.md).
Develop
uv venv && uv pip install -e ".[dev,server,cli]"
make check # ruff + mypy + pytest + JS (jsdom) tests
Layout
| Path | What |
|---|---|
tempest-core (dependency) |
Renderer-agnostic engine — IR/reconciler/state/style/widgets (import tempest_core), extracted from tempestroid. |
tempestweb/components/ |
Ready-to-use fields + forms (EmailField, PasswordField, PhoneField, LoginForm, …). |
tempestweb/transports/ |
The one seam between modes (base.py Protocol, wasm.py, websocket.py, sse.py). |
tempestweb/server/ |
FastAPI + WebSocket/SSE host (Mode B). |
tempestweb/native/ |
Web API capability adapters — http, audio, share, geo, clipboard, storage, camera (Track N). |
tempestweb/observability/ |
Telemetry, logger, error boundary, feature flags, auth — adapter pattern (Track O). |
tempestweb/pwa/ |
Web App Manifest + icon emitter (Track P). |
tempestweb/cli/ |
tempestweb new/dev/build/run. |
client/ |
Pure-JS DOM renderer, Style→CSS, event capture; pwa/ sw/ offline/ push/ native/ subdirs. |
tests/fixtures/ |
Golden wire-format fixtures derived from the core. |
Conventions
Python: double quotes, full typing (mypy --strict), Google docstrings in English,
async-first. Client: plain JavaScript only — no TypeScript, no framework, no
build step. See CLAUDE.md.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tempestweb-0.3.0.tar.gz.
File metadata
- Download URL: tempestweb-0.3.0.tar.gz
- Upload date:
- Size: 173.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d8dc422d1517c56c0bba1b23433aa9da3c9ed37cefb71f5eb8e1c3894ac6bc5
|
|
| MD5 |
c78434108e5a33f7f59be49fe0b61d98
|
|
| BLAKE2b-256 |
3d362ba0bc8c88cd289d7a7e5a0e54fec7c16ff54f7f560fced1c99cb6251f49
|
Provenance
The following attestation bundles were made for tempestweb-0.3.0.tar.gz:
Publisher:
publish.yml on mauriciobenjamin700/tempestweb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tempestweb-0.3.0.tar.gz -
Subject digest:
9d8dc422d1517c56c0bba1b23433aa9da3c9ed37cefb71f5eb8e1c3894ac6bc5 - Sigstore transparency entry: 1807362804
- Sigstore integration time:
-
Permalink:
mauriciobenjamin700/tempestweb@d8a0bf811760793bd624c22206ed76bd22246fc9 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/mauriciobenjamin700
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d8a0bf811760793bd624c22206ed76bd22246fc9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file tempestweb-0.3.0-py3-none-any.whl.
File metadata
- Download URL: tempestweb-0.3.0-py3-none-any.whl
- Upload date:
- Size: 201.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9441dd57b4be19d72b9728c4a253ad347d938aae77f565fb78303a9ff3454e4
|
|
| MD5 |
c31ebd3c19f8d1eb7bb661cceca13bed
|
|
| BLAKE2b-256 |
62c5c152930a4a7110e47eb43966761bb035d71ca453f51fef65e9ccdc8f02b1
|
Provenance
The following attestation bundles were made for tempestweb-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on mauriciobenjamin700/tempestweb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tempestweb-0.3.0-py3-none-any.whl -
Subject digest:
b9441dd57b4be19d72b9728c4a253ad347d938aae77f565fb78303a9ff3454e4 - Sigstore transparency entry: 1807362809
- Sigstore integration time:
-
Permalink:
mauriciobenjamin700/tempestweb@d8a0bf811760793bd624c22206ed76bd22246fc9 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/mauriciobenjamin700
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d8a0bf811760793bd624c22206ed76bd22246fc9 -
Trigger Event:
push
-
Statement type: