Viewport-virtualized data tables for spaday, powered by regular-table.
Documentation
- Build a 100,000-row table — guided virtual-table example.
- Add rich action cells and hot row updates — task-focused Python configuration.
- API reference — props, events, methods, and metadata.
- Why viewport virtualization matters — performance model and tradeoffs.
Quick example
from spaday import CallEndpoint, event_value, serve
from spaday_regular_table import RegularTable
rows = [{"id": i, "symbol": f"SYM{i}", "price": i / 10} for i in range(100_000)]
table = RegularTable(
columns=[
"id",
{
"key": "symbol",
"label": "Symbol",
"cell": {"tag": "button", "class": "symbol-button", "event": "symbol-click"},
},
{"key": "price", "label": "Last price", "cell": {"format": "number", "digits": 2}},
],
rows=rows,
row_header="id",
style="height: 32rem",
).on("symbol-click", CallEndpoint("POST", "/api/click", event_value()))
serve(table, packages=["regular-table"])
Only cells requested for the current viewport are copied into regular-table and rendered. rows
remains a browser-side record array. columns accepts keys or {key, label, cell} objects and is
inferred from the first row when omitted. A cell descriptor can wrap the displayed value in an HTML
or custom-element tag, apply classes and attributes, or format numeric values. The wrapper performs
that work only for visible cells.
For hot server pushes, set stream_url to an SSE endpoint whose messages are row patches. You can also
bind rowPatch to CallEndpoint(result=...) state for request/response updates. Each patch contains
revisioned update, insert, and remove operations, so a 100,000-row list is not recopied. The
browser methods remain available to integration authors, but applications need no JavaScript callback.
cell-click exposes event.detail with type, virtual x/y, column, value, and the source row, so normal spaday actions can handle interactions. virtual_mode supports upstream both, horizontal, vertical, and none; keep both for large datasets.
Run the local example
Run the complete example in your browser — Python runs locally through Pyodide; no install or server required.
python -m pip install -e ".[examples]"
python -m spaday_regular_table.example
Open http://127.0.0.1:8014 to inspect the complete market-blotter example: 100,000
virtualized rows, a server row stream, full-width sizing, rich cells, and server-authoritative update,
insert, remove, and click operations. All interaction is authored in Python; there is no companion
example.js. It passes the local package descriptor directly, so it does not install or resolve the
integration from GitHub.
Metadata
Release files for spaday-regular-table 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spaday_regular_table-0.3.0.tar.gz | 129.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spaday_regular_table-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 215.4 kB
Release files / spaday_regular_table-0.3.0.tar.gz
| Download URL | spaday_regular_table-0.3.0.tar.gz |
|---|---|
| Size | 129.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cee64ec2fca8255d9ecac57fb37456a2aaaf8997edbb588631ac839fe2bc48b2
|
|
BLAKE2b-256 checksum How to use checksums |
263777852f5776516ca0f22ac2cd9ca0c618d884fd4a188718388c91a14aadb0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / spaday_regular_table-0.3.0-py3-none-any.whl
| Download URL | spaday_regular_table-0.3.0-py3-none-any.whl |
|---|---|
| Size | 86.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
254cc4d46f10f96ca7b534b3b09405e386e5c6b6f32c90b2ac9b38e7af9d59b3
|
|
BLAKE2b-256 checksum How to use checksums |
41a8d8ac2e769d33dcf3773e7089fad0824c3c2d0973a86282c366c4e6384683
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|