Report Creator
Library to assemble reports in HTML from various components using python. Inspired by DataPane which is no longer maintained and targetted more interactive use cases.
Features
Example
import report_creator as rc
with rc.ReportCreator(
title="My Report",
description="My Report Description",
footer="My Report Footer",
) as report:
view = rc.Block(
rc.Text("""It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of light, it was the season of darkness, it was the spring of hope, it was the winter of despair.""",
label="Charles Dickens, A Tale of Two Cities"),
rc.Group(
rc.Metric(
heading="Answer to Life, The Universe, and Everything",
value="42",
),
rc.Metric(
heading="Author",
value="Douglas Adams",
),
),
rc.Bar(px.data.medals_long(),
x="nation",
y="count",
dimension="medal",
label="Bar Chart - Olympic Medals",
),
rc.Scatter(
px.data.iris(),
x="sepal_width",
y="sepal_length",
dimension="species",
marginal="histogram",
label="Scatter Plot - Iris",
),
)
report.save(view, "report.html")
Development
conda create --name rc python=3.12
conda activate rc
pip install -r requirements.txt -U
# recommended installs for code hygiene
pip install ruff
# build "kitchen_sink" example
make
# install local package
pip install -e .
# see dependency tree
pipdeptree --exclude pip,pipdeptree,setuptools,wheel,twine
Dev Notes
- 4/18/24 - no breaking changes, all changes should go through standard deprecation policies
- To render math you'll need to
pip install md4mathjax
Docs
pip install sphinx sphinx-autodoc-typehints sphinx-book-theme sphinx_copybutton sphinxcontrib-mermaid --upgrade