Skip to main content

canvasxpress-dashboards (Python)

Linked, multi-panel CanvasXpress dashboards in Python — for Jupyter, VS Code and Quarto notebooks, Dash, Streamlit, Flask and standalone pages. It renders a canvasxpress-dashboards spec, or builds a whole dashboard from a DataFrame. The renderer is bundled; there are no required dependencies (pandas only for a DataFrame).

from canvasxpress_dashboards import Dashboard

# A table in, a linked dashboard out. A patient cohort (numeric time + 0/1 event columns) gets
# filters, a Kaplan-Meier curve, a measure by group and against time, and a case card; a per-sample
# sequencing run-QC table gets filters, depth, mapping vs duplication and quality by lane.
Dashboard(data=trial, id="patient")

# Or render a spec you wrote, saved from the builder, or returned by the MCP tool.
Dashboard("my-dashboard.spec.json")

Click a patient's point and its record loads into the case card; every panel shares the data, so a selection in one panel selects the same rows in the others. If no template fits the table the page says so rather than guessing — pass a spec instead.

Where it runs

Where How
Jupyter, VS Code, Quarto, Colab evaluate a Dashboard as the last line of a cell (it is an <iframe> that grows with the dashboard)
a file Dashboard(...).save("dashboard.html") (standalone: the renderer is inlined) or .show()
Flask / FastAPI / Django return Dashboard(...).to_html() from a view
Dash html.Iframe(srcDoc=Dashboard(...).to_html(frame=True), style={"width": "100%", "height": "1400px", "border": "0"})
Streamlit st.iframe(Dashboard(...).to_html(), height=1400) (on Streamlit before st.iframe: streamlit.components.v1.html(..., height=1400, scrolling=True))
Shiny for Python ui.HTML(Dashboard(...).iframe_html(1400))

Flask and Dash are covered by the package's browser tests. Streamlit (1.66) and Shiny for Python (1.8) were run by hand: each draws the whole dashboard, with every chart, inside the frame. The page is embedded as-is in a frame that runs JavaScript, so pass it only dashboards you trust.

Data

cxd_data(df, id="patient") is what Dashboard(data=df) uses: numeric columns are the measures, every other column an annotation of the records, rows are the records (more rows than numeric columns is the orientation the templates expect). A DataFrame, a dict of columns or a list of records all work; missing values become null.

Talking to the page

A dashboard rendered with frame=True (the notebook output does) reports to the page that embeds it with window.postMessage: {type: "cxd-params", id, params} whenever a parameter changes — for the case-card dashboards, params.case is the patient last clicked — and {type: "cxd-resize", id, height} as it grows. Dashboard.frame_id is the id.

Engine and bundle

The dashboards need the CanvasXpress engine, loaded from canvasxpress.org by default (the current release, which dashboards use features of); pass engine_url= for a mirror or an offline folder holding canvasXpress.min.js and canvasXpress.css. The dashboards bundle (1 MB) is inlined in each page; bundle_url= loads it from a URL instead, which keeps notebooks small.

Not included

The server-computed insights strip (insights in a spec) needs the dashboards server and is not shown. Connector, dataset and live sources need it too; inline data (what a DataFrame becomes) works anywhere.

MIT licensed.

Metadata

Release files for canvasxpress-dashboards 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for canvasxpress-dashboards 0.1.1
File Size Uploaded Provenance
canvasxpress_dashboards-0.1.1.tar.gz 295.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for canvasxpress-dashboards 0.1.1
File Interpreter ABI Platform
canvasxpress_dashboards-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 590.2 kB

Release files / canvasxpress_dashboards-0.1.1.tar.gz

Download URL canvasxpress_dashboards-0.1.1.tar.gz
Size 295.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ce6c4c69b05136bc11fe774e9a30369a8a1efbaf641cf53f37634c6c6a4666ed
BLAKE2b-256 checksum
How to use checksums
282d9639f4d6730c92bd4dc9fb2808e67416371c9cc1927f0117886411eea0af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / canvasxpress_dashboards-0.1.1-py3-none-any.whl

Download URL canvasxpress_dashboards-0.1.1-py3-none-any.whl
Size 295.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bb4541ccdb3ea51609e68ab1069bdb69edb8bb4ec5067f18cc99be0a87b9545c
BLAKE2b-256 checksum
How to use checksums
1929b1d448fc0e08cb399fd83f7bc0f645751e4e58ce696ddae642820f0cbbcd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for canvasxpress-dashboards 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page