Skip to main content

Domrep

Generate HTML reports from Python. Build on top of dominate.

Features:

  • plot(...) - automatic handling of Matplotlib Figures, Animations or numpy arrays
  • caption(...) - caption your report figures
  • itemgrid(...) - flexible grid layout for arrays of figures
  • slider(...) - interactive slider for array of figures

Quickstart

pip install domrep

Examples

A basic document with plot and figure caption

from domrep import *
import matplotlib.pyplot as plt
from numpy.random import random

with document('My Report') as doc:
    # any item can be captioned
    with caption("A random 100×100 array"):
        # `plot` accepts any matplotlib figure/animation or image
        plot(plt.imshow(random((100, 100))))

        # or alternatively, if you to tweak the plots
        # with plot():
        #     plt.imshow(random((100, 100)))
        #     plt.colorbar()

doc.save('output.html')

Simple report generation

# use sliders to view many images/plots
images = random((10, 100, 100))
dates = range(10)
with slider():
    for date, image in zip(dates, images):
        # plot() also works as a context manager
        with plot(label=f'Date {date}'):
            plt.imshow(image)
            plt.colorbar()

Interactive slider

Metadata

Release files for domrep 0.0.2

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

Source distribution (sdist)

Source distribution for domrep 0.0.2
File Size Uploaded
domrep-0.0.2.tar.gz 18.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for domrep 0.0.2
File Interpreter ABI Platform
domrep-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 37.3 kB

Release files / domrep-0.0.2.tar.gz

Download URL domrep-0.0.2.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
0b33f269dd8a45e21d44c2890cbaeee76ddff5b53b3cd7cb4d4e246b78b7f66a
BLAKE2b-256 checksum
How to use checksums
7fcb4cbc794b39f72dd9bd12b3c081812aced57e87a111d89dc569abe85de99f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release files / domrep-0.0.2-py3-none-any.whl

Download URL domrep-0.0.2-py3-none-any.whl
Size 18.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2aa04b76837deb0e641312cf6e4ff5457206a94e3e4632061a85dddfb6063d8d
BLAKE2b-256 checksum
How to use checksums
f6f29cd246314b30eb1db55bd8a91a8125fa47fadffb07e272aeaacbf5e1f5b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.1

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

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