Skip to main content

Generate self-contained, interactive HTML reports from data in Python

Project description

téssera

Build self-contained, interactive HTML reports from Python — one file you can email, commit, or serve, with no runtime and no dependencies on the viewer's machine. Designed for batch-generated data and ML output: loop over your experiments, runs, or segments and emit a report per iteration.

Content is laid out on a grid of typed cells (charts, tables, metrics, code, images, diagrams), and the whole deck embeds into a single .html.

Documentation

https://tessera-report.readthedocs.io/

Installation

pip install tessera-report

# With Plotly, Pandas and Markdown support:
pip install "tessera-report[full]"

Quick start

from tessera import Deck, Plugin, SlideDefaults, CellDefaults

deck = Deck(
    title="My Report",
    slide_defaults=SlideDefaults(nrows=2, ncols=2),
    cell_defaults=CellDefaults(expand_button=True),
    plugins=[Plugin("plotly", "cdn"), Plugin("mermaid", "cdn")],
)

deck.add_title("My Report", subtitle="Subtitle here")
deck.add_section("1 — Introduction")

slide = deck.add_slide("Results")
slide.add_metric(value=98.7, label="Efficiency (%)", delta=+2.3)
slide.add_text("Text with **markdown** and LaTeX: $E = mc^2$")

deck.write("report", open_browser=True)

Batch generation

The core use case — one report per run, generated in a loop:

for run in experiment_runs:
    deck = Deck(title=f"Run {run.id}")
    slide = deck.add_slide("Metrics", nrows=1, ncols=3)
    slide.add_metric(value=run.accuracy, label="Accuracy", delta=run.delta)
    slide.add_plotly(run.loss_curve)
    deck.write(f"reports/run-{run.id}")

Cell types

Method Cell Description
add_text TextCell Markdown + LaTeX (MathJax)
add_metric MetricCell KPI card with value, label and delta
add_table TableCell CSV, dict, list or DataFrame
add_image ImageCell Image with lightbox and zoom/pan
add_image_slider ImageSliderCell Image carousel
add_list ListCell Bullet or numbered list
add_code CodeCell Code with syntax highlighting
add_plotly PlotlyCell Interactive Plotly chart
add_mermaid MermaidCell Declarative diagram (flowchart, etc.)
add_html HtmlCell Raw HTML without escaping
add_iframe IframeCell Embed external content
add_empty EmptyCell Reserves space in the grid

Common cell options

All add_* methods accept:

slide.add_text(
    "content",
    colspan=2,          # spans 2 columns
    rowspan=1,
    caption="Caption",
    overflow=True,      # internal scroll
    expand_button=True, # expand to fullscreen button
    copy_button=True,   # copy button (CodeCell)
    transparent=True,   # hides cell border and background
)

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tessera_report-0.4.0.tar.gz (58.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tessera_report-0.4.0-py3-none-any.whl (66.8 kB view details)

Uploaded Python 3

File details

Details for the file tessera_report-0.4.0.tar.gz.

File metadata

  • Download URL: tessera_report-0.4.0.tar.gz
  • Upload date:
  • Size: 58.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for tessera_report-0.4.0.tar.gz
Algorithm Hash digest
SHA256 25cf947ff3c529d3d7ce9b88c16aaecd52cc72191cbbb9536a241d1fb436527f
MD5 43365dba7ceb4fe7cd58c1408db1bc3e
BLAKE2b-256 8c9ad339eee9370e6fccb434a64a03a424617b18edeebca0d51f5221b9974809

See more details on using hashes here.

File details

Details for the file tessera_report-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: tessera_report-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 66.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for tessera_report-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81300773dd933d060046ac104c54d430769ee267e20e53f7d1bb57ee3267a61d
MD5 eee31ce32a2372789b8c5b5431901d9a
BLAKE2b-256 ef1ce3b8bbd28d555373558b35d1d36c98c017f09e5f6410336d507cf686eaa2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page