Skip to main content

The simple HTML report generator for Python jobs.

Project description

Otter is a simple HTML report generator for Python jobs. Otter was designed to produce reports on long-running jobs on remote machines, and send them to a web server, but it’s able to process many different outputs from Python scripts, and convert them into neat and readible HTML pages.

Otter makes use of Twitter Bootstrap to make an easily themed layout for its output.

Quick Example

Otter can be used to produce reports containing a mixture of prose, data, and figures with minimal code.

images/screenshot.jpg

This report was generated with just a small number of lines of Python:

import otter
import otter.bootstrap as bt

report = otter.Otter("index.html", author="Daniel Williams", title="Test Page", author_email= "daniel.williams@ligo.org")


with report:
    report + "#Section Title"

    report + "Lorem ipsum dolor sit amet..."


with report:

    row = bt.Row(3)

    import numpy as np
    import matplotlib.pyplot as plt

with report:
    f, ax = plt.subplots(1,1)
    x = np.linspace(0,10, 100)
    ax.plot(x, np.sin(x))

    row[1] + f

    row[0] + {"mass": "1kg", "price": "$1000", "area": 400}

    report + row

with report:
    report + "##Subsection Header"
    report + "Fusce vel lectus ultricies,... "

Features

  • TODO Add support for pandas data tables

  • TODO Add support for custom headers and footers

Credits

Tools used in rendering this package:

History

0.0.1 (2016-01-30)

  • First release on PyPI.

0.2.0 (2018-07-18)

“Beinn Dorain”

  • New API for adding material to reports

  • Full support for matplotlib plots

  • Support for multiple data types in reports

0.3.0 (2020-03-02)

“Beinn an Dothaidh”

  • Improved Python 3 support.

  • Removed Python 2 support.

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

otter-report-0.3.3.tar.gz (206.9 kB view details)

Uploaded Source

Built Distribution

otter_report-0.3.3-py2.py3-none-any.whl (16.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file otter-report-0.3.3.tar.gz.

File metadata

  • Download URL: otter-report-0.3.3.tar.gz
  • Upload date:
  • Size: 206.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for otter-report-0.3.3.tar.gz
Algorithm Hash digest
SHA256 c040df0d2aadae7ac2260ce0b2543fdbcb8ad0febbb7de1b193406867bb48ba2
MD5 cae5a907d9f95a6a75962c2eb503c62b
BLAKE2b-256 814b8ee94e8398e41a959d55a1d09ed881aa9073418033791d8dae6df2c8be19

See more details on using hashes here.

File details

Details for the file otter_report-0.3.3-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for otter_report-0.3.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 125225a311fb75d144ad903ab2492c7d32b7d766e89a4fac91878d5b430aa132
MD5 1874146981eddedfb3f4ef9fa9e5811a
BLAKE2b-256 ec0d372ad3019b8c3dbaf6aec740549654224024cbf8ac9313ad2b6db00c8ce7

See more details on using hashes here.

Supported by

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