Simple HTML page and PDF document generator for Python.
Project description
esparto
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:
- Markdown
- Images
- Pandas DataFrames
- Matplotlib
- Bokeh
- Plotly
Installation
esparto is available from PyPI:
pip install esparto
If PDF output is required, weasyprint
must also be installed:
pip install weasyprint
Dependencies
License
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
Bokeh and Plotly - Webpage | PDF
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.