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 from opt-in packages 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, element

# a checkbox two-way-bound to a state field, rendered in a Jupyter cell
ui = element("input", type="checkbox").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.5.0.tar.gz (1.6 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.5.0-cp311-abi3-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.11+Windows x86-64

spaday-0.5.0-cp311-abi3-manylinux_2_28_x86_64.whl (1.5 MB view details)

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

spaday-0.5.0-cp311-abi3-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for spaday-0.5.0.tar.gz
Algorithm Hash digest
SHA256 69c1b66e82454acb24a1944154fbecdadae87065f1092fbef750e823ab0d4973
MD5 ea7e6e21960152d92d9c7f8e77ecbd4e
BLAKE2b-256 9e35bb1781b0e2472983e45d7f5b295f14b4231011945a97e05065229725eaa1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spaday-0.5.0-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.3 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.5.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b8e53c72255b2d263a441e3ba20dc20d45a48a7195dc0da74603d30b3a2b61b7
MD5 a5fffd218c9ae9a52997749848d793a1
BLAKE2b-256 44ea1f8ab1d210c7e52cbe380e7c5df151c20981f2ae91d746a55c588e164af9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spaday-0.5.0-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 902f28a4c5048694eda8f29b97b0370f7193c4ebf4c4d98e6811bf012bd85016
MD5 5144a1e69bc9667c82bd706fa95abe8e
BLAKE2b-256 064f0a72a9cabdf05fc1cb69744ab3481a39c6a41ad4b2b35d761fda7f232881

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spaday-0.5.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5bf55163a3e2a49ee1c07322d4c274d39b994dc2a28ca101e6460794b1700dc9
MD5 46216e5a966720ecc94afee4b94c9a37
BLAKE2b-256 527e2502f0fc083a2ae9209c1473b5577211c60b0d326051ec74a8ae6d0306e6

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