Skip to main content

Simple HTML page and PDF document generator for Python.

Project description

esparto

image PyPI pyversions Build Status codecov Quality Gate Status PyPI - Downloads

Introduction

esparto is a Python package for building shareable reports with content from popular data analysis libraries. With just a few lines of code, esparto turns DataFrames, plots, and Markdown into an interactive webpage or PDF document.

Documents produced by esparto are completely portable - no backend server is required - and entirely customisable using CSS and Jinja templating. All content dependencies are declared inline or loaded via a CDN, meaning your reports can be shared by email, hosted on a standard http server, or made available as static pages as-is.

Basic Usage

import esparto as es
page = es.Page(title="My Report")
page["Data Analysis"] = (pandas_dataframe, plotly_figure)
page.save_html("my-report.html")

Main Features

  • Automatic and adaptive layout
  • Customisable with CSS or Jinja
  • Jupyter Notebook friendly
  • Output as HTML or PDF
  • Built-in adaptors for:

Installation

esparto is available from PyPI:

pip install esparto

If PDF output is required, weasyprint must also be installed:

pip install weasyprint

Dependencies

License

MIT

Documentation

Full documentation and examples are available at domvwt.github.io/esparto/.

Contributions, Issues, and Requests

All feedback and contributions are welcome - please raise an issue or pull request on GitHub.

Examples

Iris Report - Webpage | PDF

Bokeh and Plotly - Webpage | PDF


example page

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

esparto-2.0.0.tar.gz (48.6 kB view hashes)

Uploaded Source

Built Distribution

esparto-2.0.0-py3-none-any.whl (49.6 kB view hashes)

Uploaded Python 3

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