A minimal static dashboard generator with Plotly support
Project description
staticdash
staticdash is a lightweight Python module for creating static, multi-page HTML dashboards. It supports Plotly plots, tables, and text content, with a fixed sidebar for navigation.
Installation
Clone the repository and install it in editable mode:
git clone https://github.com/briday1/staticdash.git
cd staticdash
pip install .
Usage
Create a Python script like this:
from staticdash.dashboard import Dashboard, Page
import plotly.graph_objects as go
import pandas as pd
# Create the dashboard
dashboard = Dashboard(title="StaticDash Demo")
# Page 1: Overview
page1 = Page("overview", "Overview")
# Add plo
fig = go.Figure()
fig.add_trace(go.Scatter(x=[1, 2, 3], y=[4, 1, 6], mode='lines+markers', name="Demo Line"))
fig.update_layout(title="Sample Plot")
page1.append(fig)
# Add table
df1 = pd.DataFrame({
"Category": ["A", "B", "C"],
"Value": [100, 200, 150]
})
page1.append(df1)
# Add extra text
page1.append("This page includes a sample plot, table, and descriptive text.")
dashboard.add_page(page1)
# Page 2: Data Table
page2 = Page("data", "Data")
df2 = pd.DataFrame({
"Name": ["Alice", "Bob", "Charlie"],
"Score": [85, 92, 78],
"Passed": [True, True, False]
})
page2.append("This table shows individual scores and pass/fail status.")
page2.append(df2)
dashboard.add_page(page2)
# Page 3: Notes
page3 = Page("notes", "Notes")
page3.append("These are concluding notes about the dataset.")
page3.append("You can also add multiple text blocks like this.")
dashboard.add_page(page3)
# Publish the dashboard
dashboard.publish(output_dir="output")
After running the script, open output/index.html in your browser.
Project details
Release history Release notifications | RSS feed
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 staticdash-0.1.0.tar.gz.
File metadata
- Download URL: staticdash-0.1.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cad333c2d29a41775f1b6f7e8f846ce8ecde8827844af5d5abd90257862abece
|
|
| MD5 |
4b4a46a053a9ac87fd026aa2899e8bc4
|
|
| BLAKE2b-256 |
63533a3827d363159d5e160c54f5d532d5c0aacc3ce81e1c8d1dae9973d6f892
|
File details
Details for the file staticdash-0.1.0-py3-none-any.whl.
File metadata
- Download URL: staticdash-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a527637abb263176bfd78530e20c94a8437a1e74979e54e5b2a677ac9fcfda32
|
|
| MD5 |
43a47854f8205bcdeb9b171ddadd2c59
|
|
| BLAKE2b-256 |
b5748a2b5b2cad9f62128f61b3e5ec4623090fbeb1a747f2d62934445a098ca3
|