Montin¶
Montin is a Python library for generating self-contained, interactive
HTML reports from data — a single .html file with no runtime, ideal for
batch-generated ML and analytics output, dashboards, and technical reports.
Content lives on a grid of typed cells (charts, tables, metrics, code, images,
diagrams). Build a report programmatically, then write() it to one portable
file you can email, commit, or serve.
# Core only
pip install montin
# Adds Markdown rendering + WebP image conversion
pip install "montin[full]"
Live demo¶
The report below is an example of the capabilities of Montin.
For a better view, click the ⛶ Fullscreen (F) button on the bottom toolbar.
Example of use:¶
from montin import Deck, Plugins, SlideDefaults
deck = Deck(
title="Report",
plugins=[Plugins.Plotly(), Plugins.Mermaid()],
)
deck.add_title("Report", subtitle="Production Engineering")
slide = deck.add_slide("KPIs", nrows=1, ncols=3)
slide.add_metric(value=98.7, label="Efficiency (%)", delta=+2.3)
slide.add_metric(value=142, label="Defects", delta=-18)
slide.add_metric(value="4.8", label="NPS")
deck.write("report", open_browser=True)
Guides
- Quick start
- Deck structure
- Cell types
- TextCell —
add_text() - MetricCell —
add_metric() - TableCell —
add_table() - ImageCell —
add_image() - ImageSliderCell —
add_image_slider() - ListCell —
add_list() - CodeCell —
add_code() - PlotlyCell —
add_plotly() - MermaidCell —
add_mermaid() - HtmlCell —
add_html() - IframeCell —
add_iframe() - EmptyCell —
add_empty()
- TextCell —
- Interactive tables
- Plugins
- Slide IDs
- Links
- Live editing
- Layout
- Security & offline use
- Live demo
Reference