Skip to main content

spaday

Build Status codecov License PyPI

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

[!NOTE] This library was generated using copier from the Base Python Project Template repository

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spaday-0.3.0.tar.gz (5.5 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

spaday-0.3.0-cp311-abi3-win_amd64.whl (7.1 MB view details)

Uploaded CPython 3.11+Windows x86-64

spaday-0.3.0-cp311-abi3-manylinux_2_28_x86_64.whl (5.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ x86-64

spaday-0.3.0-cp311-abi3-macosx_11_0_arm64.whl (5.2 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

File details

Details for the file spaday-0.3.0.tar.gz.

File metadata

  • Download URL: spaday-0.3.0.tar.gz
  • Upload date:
  • Size: 5.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for spaday-0.3.0.tar.gz
Algorithm Hash digest
SHA256 661efea93b56a0837f93dde4ea9f8f6c963c3aee6dae91f4c2140767b6ed10b1
MD5 ac89be8a82f1da0fb5667973fb950c98
BLAKE2b-256 01e9bedb06bce9547137db2e702f1c75195914090ba8b69e4d0c16dd88a28184

See more details on using hashes here.

File details

Details for the file spaday-0.3.0-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: spaday-0.3.0-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 7.1 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for spaday-0.3.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3a6589e4614544f27ecd23cc258433ef500d17b6fee4e602398703096f02f1a8
MD5 de9f14908e20138db52e578a96b64bfe
BLAKE2b-256 8d549623f0f1eae8385a4cc7ce0cdac6dd1ecabb4a6087bee1eda550a8c7694f

See more details on using hashes here.

File details

Details for the file spaday-0.3.0-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for spaday-0.3.0-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2264af0d1d5cc5f20d6e74e9395ac4cde50f68a001a05d8cf2c45599eedb0fb6
MD5 8b96e4b6b332185ea000f9868d3c74fe
BLAKE2b-256 7bbadcd68269d052dcf718a3fc6876a4202a2f67e7c4bcc732402c91b2da8c6b

See more details on using hashes here.

File details

Details for the file spaday-0.3.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for spaday-0.3.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a2fc3c02d52511147b9f2ad4124e766cc1b0e3e18a537542e336c0d10777ba10
MD5 f3607557f773f9e65647023be19a2898
BLAKE2b-256 2b9ceef14fd2bf558d630c23d7d39104ad0d71cc871fe97c1fb549a90b646854

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page