Skip to main content

report-toolkit

Build analytical reports in Python or Markdown templates and export styled HTML with tables, charts, sections, and column layouts.

Install

Install the package:

pip install report-toolkit

From a checkout:

uv sync

For tables, charts, and YAML template metadata, use uv sync --extra all. Individual extras are pandas, altair, matplotlib, plotly, and templates; offline additionally supports embedding Altair's JavaScript.

Quick start

from report_toolkit import Report

report = Report('Sales review', author='Report author')
report.heading(1, 'Summary')
report.markdown('Revenue **increased** this month.')
report.unordered(['Review the results', 'Plan the next month'])
report.write('sales.html', toc=True)

Open sales.html in a browser.

Documentation

Start with Getting Started, use Common Tasks for recipes, and consult the API Reference for signatures and constraints.

Two equivalent examples

Python composition and Markdown templates, using monthly_sales.md, generate the same sales report. They demonstrate shared text, list, table, chart, and layout capabilities.

uv run --extra all python examples/sales_report.py
uv run --extra all python examples/template_report.py

Each prints its report tree and output path. Open examples/sales_report.html and examples/template_report.html in a browser. Altair and Plotly charts require network access for their JavaScript. Raw HTML is covered in the recipes, since templates escape it.

Themes

Export with style={'mode': 'dark'}, or use style={'mode': 'auto'} to follow the reader's system appearance. Choose slate, azure, parchment, or ember with style={'palette': 'parchment'}. The default preserves the previous light appearance. Define reusable Style, Theme, and Palette objects; see Themes for customization and migration from theme=, and the theme gallery.

Development

uv run --extra all pytest
uv run --extra all make test
uv run ruff check .
uv run ruff format --check .
uv run make build

make test and pytest both run the unittest-compatible suite, including the example integration test. Optional integration tests skip when dependencies are absent. Version tags run tests, Ruff lint, and a format check before the release workflow builds and publishes to PyPI.

Theming code lives in src/report_toolkit/themes/: structural defaults belong in theme.py, color values in palette.py, and configuration normalization in style.py. Edit src/report_toolkit/resources/report.css for static report CSS; HTML-specific scoping and dynamic style generation live in the writer. CSS is packaged with the library and embedded in exported HTML. After changing resources or package-data settings, run make build and verify the built distributions.

Artifact layout is configurable per item:

report.add(table, center=True)
report.add(chart, width='full', expand='always')
report.write('report.html', pretty=True)  # Compact markup is the default.

Tables and charts use native width by default. Oversized artifacts offer an centered expanded view with zoom controls and a Close icon. Zoom is available only in the expanded preview. See artifact options for details.

Metadata

Release files for report-toolkit 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for report-toolkit 0.1.0
File Size Uploaded Provenance
report_toolkit-0.1.0.tar.gz 53.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for report-toolkit 0.1.0
File Interpreter ABI Platform
report_toolkit-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 89.8 kB

Release files / report_toolkit-0.1.0.tar.gz

Download URL report_toolkit-0.1.0.tar.gz
Size 53.5 kB
Tags Source
SHA-256 checksum
How to use checksums
56adc33ab478fa4c23e28618721a9c778b4c54fd1f0b70e200079884d99c2ded
BLAKE2b-256 checksum
How to use checksums
88567491cdfa9e2f405444493990b19a13b0aaab78b867786a885cf833ecf359
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / report_toolkit-0.1.0-py3-none-any.whl

Download URL report_toolkit-0.1.0-py3-none-any.whl
Size 36.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
811f6cc4807c08e06201d04ca71e19974e79cc9e5bf4f35fcd3600123fc30dad
BLAKE2b-256 checksum
How to use checksums
7a0ebeb28f2ab27dc1ff74b43eb419d22059ddec4e691f315288bd7e77e2a249
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Security for report-toolkit 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for report_toolkit-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page