Data driven report builder for the PyData ecosystem.
Project description
esparto
Introduction
esparto is a Python library for building data driven reports with content from popular analytics packages. The project takes a straightforward approach to document design; with a focus on usability, portability, and extensiblity.
Creating a report is as simple as instantiating a Page object and 'adding' content in the form of DataFrames, plots, and markdown text. Documents can be built interactively in a notebook environment, and the results shared as a self-contained HTML page or PDF file.
Further customisation of the output is possible by passing a CSS stylesheet, changing the Jinja template, or declaring additional element styles within the code. The responsive Bootstrap grid ensures documents adapt to any viewing device.
Basic Usage
import esparto as es
# Do some analysis
pandas_dataframe = ...
plotly_figure = ...
# Create a Page object
page = es.Page(title="My Report")
# Add content
page["Data Analysis"]["Plot"] = plotly_figure
page["Data Analysis"]["Data"] = pandas_dataframe
# Save to HTML or PDF
page.save_html("my-report.html")
page.save_pdf("my-report.pdf")
Main Features
- Interactive document design with Jupyter Notebooks
- Share as self-contained HTML or PDF
- Customise with CSS and Jinja
- Responsive Bootstrap grid layout
- Content adaptors for:
- Markdown
- [Images]
- Pandas DataFrames
- Matplotlib
- Bokeh
- Plotly
Installation
esparto is available from PyPI and Conda:
pip install esparto
conda install esparto -c conda-forge
Dependencies
- python >= 3.6
- jinja2
- markdown
- BeautifulSoup
- PyYAML
Optional
- weasyprint (for PDF output)
License
Documentation
Documentation and examples are available at domvwt.github.io/esparto/.
Contributions, Issues, and Requests
Feedback and contributions are welcome - please raise an issue or pull request on GitHub.
Examples
Iris Report - Webpage | PDF | Notebook
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.