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
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.2.2
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.2.2.tar.gz | 121.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spaday_regular_table-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 205.0 kB
Release files / spaday_regular_table-0.2.2.tar.gz
| Download URL | spaday_regular_table-0.2.2.tar.gz |
|---|---|
| Size | 121.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09cf048a99de196e750bc24613e40b642c0b88069b67deba7cad0abba188904b
|
|
BLAKE2b-256 checksum How to use checksums |
f7d6ac92720328f004ee32a6d2fe68250e60cff2dc6c6b4228bdeb31337361f3
|
| 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.2.2-py3-none-any.whl
| Download URL | spaday_regular_table-0.2.2-py3-none-any.whl |
|---|---|
| Size | 83.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
164b74365d40868d7068067237167ca69a80fe9c2d30ba1d2fbe2297e8ea9c13
|
|
BLAKE2b-256 checksum How to use checksums |
28ee69a4605614c7cb3888b5f546a53c3c274e88ed0942d6807e4d608c103877
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|