Build reactive web-component UIs configured in Python, executed in the browser
Project description
spaday
Build reactive web-component UIs configured in Python, executed in the browser.
Overview
You author a UI as a tree of typed Python components — WebAwesome by default, or any library that ships a Custom Elements Manifest. You attach behavior as declarative data: an action DSL (toggle a prop, send a model edit, call an endpoint) and reactive bindings (a control two-way-bound to a state field, or a prop computed from others). spaday's JavaScript runtime renders the tree to real web components and interprets that behavior client-side — so a toggle or a derived value updates with no round-trip to Python.
That UI state is a transports model, so it syncs over any connection (WebSocket, SSE, Jupyter comm) and any codec; the same tree drops into a web app or a Jupyter notebook unchanged.
Like transports, spaday is a Rust core with thin bindings: the component tree, the diff engine, the CEM parser, the action interpreter, and the reactive engine live in Rust and compile to PyO3 (Python authors the tree) and wasm (the browser runs it). One core, two bindings.
from spaday import Widget
from spaday.components.webawesome import WaCard, WaSwitch
# a switch two-way-bound to a state field, rendered in a Jupyter cell
ui = WaCard().child(WaSwitch().text("Lamp").bind("checked", "on", mode="two-way"))
w = Widget(ui, state={"on": True})
w # flip the switch → w.state["on"] flips in Python; set w.state → the switch follows
Install
pip install spaday # core: author + serialize component trees
pip install "spaday[widget]" # + the Jupyter / anywidget host
Documentation
- Tutorial — build your first interactive UI, step by step (in a notebook).
- How-to guides — author a component tree, add behavior and reactivity, serve and embed an app, use it in a notebook, sync to a server over transports, wrap an imperative JS library, generate typed classes from a manifest.
- API reference — the Python surface.
- How spaday works — the architecture and the reasoning behind it.
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 Distributions
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 spaday-0.1.0.tar.gz.
File metadata
- Download URL: spaday-0.1.0.tar.gz
- Upload date:
- Size: 318.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4572a7deb69d0e0af340fc5be7ea0fd7e7cab11b7f2330add7609ccc4931a22a
|
|
| MD5 |
0507692c77cffa6e6474ee72f6ccc0b8
|
|
| BLAKE2b-256 |
9d51e0f4df7ae9a9e5670fbcecafc7e5948324f29cda1230fb77053ecbc1103b
|
File details
Details for the file spaday-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: spaday-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.11+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb703660646fe5ac829e6a44b1f0d0ba494babc3184380b46824668ef69c3c2c
|
|
| MD5 |
fdcf288840ab35914fda47fee3498652
|
|
| BLAKE2b-256 |
1b9c6a64ff003080d037b731c082e3a25f42f9ed28d7525a60b250099ba2b40e
|
File details
Details for the file spaday-0.1.0-cp310-abi3-win_amd64.whl.
File metadata
- Download URL: spaday-0.1.0-cp310-abi3-win_amd64.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.10+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c62b11fcd1809bd6f820e7df8cf60d3e71553727bb197aed9ed130269d202460
|
|
| MD5 |
244906c03764cbaa1ab8b730a6dbac0c
|
|
| BLAKE2b-256 |
132c6b1f4f6a5293e7de2367fcc06e22137615dca2bfb8495e26c25ef1cbf5a0
|
File details
Details for the file spaday-0.1.0-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: spaday-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c7b5340da2cbe695b2eda629fcd93e8c85d9d0f5761521fcf867e4e20073f90
|
|
| MD5 |
170cd9ad9dceb35a85dd133ae1e56786
|
|
| BLAKE2b-256 |
846884f9ba4f5c3ce63ab522cb44a1733aece58c0022317a5230da440975fc9e
|