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

Component ecosystem

Install only the integrations an application uses. Each package provides typed Python components and registers its browser assets with spaday:

Select an installed integration by its entry-point name, for example serve(page, packages=["trees"]).

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.4.1.tar.gz (3.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.4.1-cp311-abi3-win_amd64.whl (5.1 MB view details)

Uploaded CPython 3.11+Windows x86-64

spaday-0.4.1-cp311-abi3-manylinux_2_28_x86_64.whl (3.3 MB view details)

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

spaday-0.4.1-cp311-abi3-macosx_11_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for spaday-0.4.1.tar.gz
Algorithm Hash digest
SHA256 5cc4788db53fbaee02322f25e8e5c9077d50e6fffbf805eabb8a1a69a7767073
MD5 9c5d9507582c915e2ac134684d9df645
BLAKE2b-256 5e104920b0bdef65501409a107ee47cf9466de2a1c04ffb5686452172cb6b5ef

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for spaday-0.4.1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b24b0db43090a0d0b5b6505faed323cb874c7d430017607070ba2659ca5fa1b4
MD5 d271e7c2effc7efa8a29bb5d05ad1bfd
BLAKE2b-256 82163464c46a8bff1e3463c53645dd0fe61e6427d355b432b5907cb5920d4ac4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spaday-0.4.1-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 445111c77a9e10434c0baef14d7ed246f54304174992cfb9622f0502e2d61cf9
MD5 03bc723570a1af9c8de1d04d9509bc68
BLAKE2b-256 ebc8ed67dddb830e9c939e7182558e0b2e48817eadfe352b0eaa515906a3fd6d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spaday-0.4.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b7fbcdfeea528b5f8881b4611b6de30f7cbfb5444432e135fd3a60650045c0ee
MD5 9866335a76d678910f80fdbfafe43c68
BLAKE2b-256 5fa8e5c19e033b2a932cfc376c06eb1cb176cf211193ef6b525843d64ac1005f

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