dashboardfy
Generate beautiful, self-contained, interactive HTML dashboards from one or more
pandas DataFrames — no server, no JavaScript build step, just a single .html file
you can open in any browser or share by email.
Features
- One function call: pass a DataFrame (or several) and get an HTML file.
- Tabs: each DataFrame is rendered in its own tab, with optional title, description, KPI cards, and info/warning notices.
- KPIs: computed aggregations (
sum,mean,median,min,max,count,nunique,std,first,last) over any column, or explicit values, with custom formatting. - Interactive tables:
- Global search across all columns.
- Per-column filter inputs.
- Per-column sort (ascending/descending, numeric-aware) and hide/show buttons.
- Themes:
light(default),dark,minimal,ocean. - Safe: all cell values, titles and descriptions are HTML-escaped.
Installation
pip install dashboardfy
Quick start
import pandas as pd
import dashboardfy
df = pd.DataFrame({"product": ["A", "B"], "revenue": [100, 250]})
# Simplest form: one DataFrame -> dashboard.html
dashboardfy.generate(df, "dashboard.html", title="Sales report")
# Several DataFrames as tabs
dashboardfy.generate({"Sales": df, "Inventory": df2}, "report.html", theme="dark")
Full example with tabs, KPIs and notices
import pandas as pd
from dashboardfy import Tab, KPI, generate
sales = pd.DataFrame(...)
tabs = [
Tab(
df=sales,
title="Sales",
description="Monthly sales by product and region.",
kpis=[
KPI(label="Total revenue", column="revenue", agg="sum", fmt="${:,.0f}"),
KPI(label="Best day", column="units", agg="max", detail="units in one day"),
KPI(label="Distinct products", column="product", agg="nunique"),
],
info="Data refreshed daily from the warehouse.",
warning="Returns are not yet included in these figures.",
),
Tab(df=inventory, title="Inventory"),
]
generate(
tabs,
"report.html",
title="Company dashboard",
description="Key figures for August 2026.",
theme="ocean",
)
If you want the HTML as a string instead of a file, use
dashboardfy.render_html(...) with the same arguments (minus output_path).
API
generate(data, output_path="dashboard.html", *, title=None, description=None, theme="light") -> Path
data accepts:
| Input | Result |
|---|---|
pd.DataFrame |
single tab |
dict[str, pd.DataFrame] |
one tab per entry, keys as tab titles |
list[pd.DataFrame | Tab] |
one tab per item |
Tab |
single tab |
Tab(df, title=None, description=None, kpis=[], info=None, warning=None)
KPI(label, column=None, agg="sum", value=None, fmt=None, detail=None)
Either give column + agg, or an explicit value. fmt is a Python format
string applied to the result, e.g. "${:,.2f}" or "{:.1%}".
Development
pip install -e .[dev]
pytest
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dashboardfy-0.1.0.tar.gz.
File metadata
- Download URL: dashboardfy-0.1.0.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6c14a14472ae39fc6f319bd9707ef64d9c4519c6614e4529649d42bf9eb6c12
|
|
| MD5 |
31dcfb48dcda8aa0814e108b1d8c7b1c
|
|
| BLAKE2b-256 |
ef8d971633f8c91ff7a1f06a8af307aee8b792b4485ee6490464f4b1b03750dc
|
File details
Details for the file dashboardfy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dashboardfy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
346e4bafdb2e4a749fdeaef0aed2a5e946ad9c487f3351c809f0f80eb70abbe8
|
|
| MD5 |
30e5500849e66050425b23d364fb427f
|
|
| BLAKE2b-256 |
e3c72be745ab90ed7385bad2160cb602727d767f696f5830212f9668e894fc69
|