Client-side Python SPA framework via Pyodide
Project description
Build interactive web apps in Python, no JavaScript required.
Documentation · Getting Started · Examples · Contributing
Overview
Wybthon is a client-side SPA framework that lets you build interactive web applications entirely in Python. Powered by Pyodide, it runs in the browser and provides a signals-first reactive model inspired by SolidJS. With fine-grained reactivity, a virtual DOM, component model, routing, forms, and context, you can write modern frontends without touching JavaScript.
Features
- Run-once components + reactive holes: function bodies run a single time at mount. Embed a signal getter anywhere in your VNode tree and the reconciler wires it as a reactive hole — only that DOM node updates when the signal changes. No React-style re-renders.
- Signals-first reactivity: Fine-grained updates with
create_signal,create_effect,create_memo,batch,untrack, andon. - Virtual DOM: Function components with efficient, batched diffing — amortising the Pyodide ↔ JS bridge cost while keeping SolidJS-style fine-grained updates above it.
- Client-side router: Path parameters, query parsing,
Linkcomponent, and programmatic navigation. - Context API: Share state across the component tree with
create_contextanduse_context. - Forms and validation: Built-in form state management with validators and two-way bindings.
- Flow control primitives:
Show,For,Index,Switch,Match, andDynamicfor declarative rendering. - Error boundaries and Suspense: Graceful error handling and async loading states.
- Dev server with hot reload:
wyb devlaunches a local server with SSE-based auto-reload.
Quick Start
Installation
pip install wybthon
Usage
from wybthon import button, component, create_signal, div, p, span
@component
def Counter(initial: int = 0):
count, set_count = create_signal(initial)
# The body runs ONCE. ``count.get`` is a reactive hole — only the
# text node inside the span updates when the signal changes.
return div(
p("Count: ", span(count.get)),
button("Increment", on_click=lambda e: set_count(count() + 1)),
)
Documentation
Visit docs.wybthon.com for the full documentation, including getting started guides, core concepts, API reference, and working examples.
Contributing
Contributions are welcome. Please see CONTRIBUTING.md for setup instructions, coding standards, and guidelines for submitting pull requests.
License
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 wybthon-0.23.0.tar.gz.
File metadata
- Download URL: wybthon-0.23.0.tar.gz
- Upload date:
- Size: 101.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
892f702ac9b868370a869363641cf207341c0a7f3b0fdfabe942853632c37643
|
|
| MD5 |
227ec69d5141cb77439880ec86dfd9c5
|
|
| BLAKE2b-256 |
2299e067c8951f01185b1fe1347a95b94a840488886267208340777281ea49c1
|
Provenance
The following attestation bundles were made for wybthon-0.23.0.tar.gz:
Publisher:
release.yml on wybthon/wybthon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wybthon-0.23.0.tar.gz -
Subject digest:
892f702ac9b868370a869363641cf207341c0a7f3b0fdfabe942853632c37643 - Sigstore transparency entry: 1365990303
- Sigstore integration time:
-
Permalink:
wybthon/wybthon@5645c8b6147a77c9a28860cf033038f814219897 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/wybthon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5645c8b6147a77c9a28860cf033038f814219897 -
Trigger Event:
push
-
Statement type:
File details
Details for the file wybthon-0.23.0-py3-none-any.whl.
File metadata
- Download URL: wybthon-0.23.0-py3-none-any.whl
- Upload date:
- Size: 71.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 |
e792a5b664328612ef2f3e2df4fd0b5bbd58c9afafdc1028f925b178f5ac1d5b
|
|
| MD5 |
5042b436b42f0d004b68bb42b89d69a0
|
|
| BLAKE2b-256 |
5f999171b2fecb1ee31a9015912c48b84d4ab297021f92cff91355ca83863bb7
|
Provenance
The following attestation bundles were made for wybthon-0.23.0-py3-none-any.whl:
Publisher:
release.yml on wybthon/wybthon
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wybthon-0.23.0-py3-none-any.whl -
Subject digest:
e792a5b664328612ef2f3e2df4fd0b5bbd58c9afafdc1028f925b178f5ac1d5b - Sigstore transparency entry: 1365990334
- Sigstore integration time:
-
Permalink:
wybthon/wybthon@5645c8b6147a77c9a28860cf033038f814219897 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/wybthon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5645c8b6147a77c9a28860cf033038f814219897 -
Trigger Event:
push
-
Statement type: