Skip to main content

HTML report generation on top of Dominate

Project description

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

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

domrep-0.0.1.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

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

domrep-0.0.1-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

Details for the file domrep-0.0.1.tar.gz.

File metadata

  • Download URL: domrep-0.0.1.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for domrep-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a1b0d650d81dd389f766afb132e44ca5ce48c54ed31cfa6453a8944db9ccf3aa
MD5 22843d0eadc4b6bbd9f3c27d530e9e31
BLAKE2b-256 889d7dbe2fd40d61cddd9420c2fa26b01c3958cbf288a217619c237d512aac93

See more details on using hashes here.

File details

Details for the file domrep-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: domrep-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for domrep-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 602a16a757b75fb7bc5c359f4ef73e02f3da780d3e94840e35b4fe71a16e94f4
MD5 6dcb834b9ecaece4a9a1454465928a12
BLAKE2b-256 6e947f8eea2739d79c20b2e6bbb63ab732ef5b6fa5c89b4e1d3c1f8b001a99eb

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