Paperthin
About
Paperthin is a lightweight Python library to easily create HTML reports.
The idea is very simple:
- You provide various items to add to the report (plots, figures, tables...).
- Paperthin stitches them into a nicely formatted HTML report.
- You can then share the report with collaborators (no installations needed on their side).
Why use Paperthin over a plain Jupyter Notebook?
- As it is plain Python, it is very easy to automate (no papermill variable injection, takes care of the rendering).
- Minimal but clean formatting (sections, collapsible descriptions, rendering presets for many types of data).
- Embeds the data in the report and provides download buttons to retrieve it.
- Easy to inspect in git diffs (no need to learn Jupytext syntax).
Installation
pip install paperthin
Requires Python 3.12+.
Quick start
- Create a
Reportobject - Add
Sections (graphical dividers) andEntryitems with+ - Call
report.make_report(path).
from matplotlib import pyplot as plt
from paperthin import Entry, Report, Section
fig, ax = plt.subplots()
ax.plot([1, 2, 3], [1, 4, 9])
report = (
Report("My report")
+ Section("Plots")
+ Entry.plot(
fig,
title="Squares",
info="A simple plot with its underlying data attached.",
)
)
report.make_report("report.html")
This produces a single, self-contained report.html file you can open in a
browser or send to anyone: no Python or Jupyter required on their end.
Entries
Entry currently provides constructors for the following data types:
| Constructor | Source |
|---|---|
Entry.plot(...) |
matplotlib Figure |
Entry.image(...) |
path to a .png or .svg file |
Entry.tabular(...) |
polars/pandas DataFrame, or csv/tsv path |
Entry.value(...) |
a single str or float |
Entry.config(...) |
dict, or path to a yaml/json file |
Documentation
This README covers the basics. Extended documentation is planned, including how to create custom entries, and will be linked here once available.
Citation
If paperthin is useful in your work, please consider citing the repo: https://github.com/StefanoCretti/paperthin
License
BSD-3-Clause. See LICENSE for details.
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 paperthin-0.1.0.tar.gz.
File metadata
- Download URL: paperthin-0.1.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38139d03615465b24b42f39a30456281e8ed2b800e3f708fdd2c54e62af22b10
|
|
| MD5 |
7f4e9f00a74237dfacfa254a4905fdf2
|
|
| BLAKE2b-256 |
d6a6d6f52549f91f74779ed7c4d40b25c751e2aae3704308c6902edde59bcdc9
|
Provenance
The following attestation bundles were made for paperthin-0.1.0.tar.gz:
Publisher:
publish.yml on StefanoCretti/paperthin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
paperthin-0.1.0.tar.gz -
Subject digest:
38139d03615465b24b42f39a30456281e8ed2b800e3f708fdd2c54e62af22b10 - Sigstore transparency entry: 2466442038
- Sigstore integration time:
-
Permalink:
StefanoCretti/paperthin@f6c8bffd7a59eec1070a055d796dd36371db43e6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/StefanoCretti
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f6c8bffd7a59eec1070a055d796dd36371db43e6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file paperthin-0.1.0-py3-none-any.whl.
File metadata
- Download URL: paperthin-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d00e866583bebaa809a9962929ff1ab1b9b1cf97c836ab97eae6e75347ff9a77
|
|
| MD5 |
834309c313d2f76548fd0373d06b6b73
|
|
| BLAKE2b-256 |
97f3d8698d72933e4b4ea9a0c75a830c1238851ce065b96cc8b6c09b72655538
|
Provenance
The following attestation bundles were made for paperthin-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on StefanoCretti/paperthin
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
paperthin-0.1.0-py3-none-any.whl -
Subject digest:
d00e866583bebaa809a9962929ff1ab1b9b1cf97c836ab97eae6e75347ff9a77 - Sigstore transparency entry: 2466442048
- Sigstore integration time:
-
Permalink:
StefanoCretti/paperthin@f6c8bffd7a59eec1070a055d796dd36371db43e6 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/StefanoCretti
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f6c8bffd7a59eec1070a055d796dd36371db43e6 -
Trigger Event:
push
-
Statement type: