esparto is a Python library for building data driven reports with content from popular analytics packages.
Main Features
- Create beautiful analytical reports using idiomatic Python
- Generate content from:
- Develop interactively with Jupyter Notebooks
- Share documents as a self-contained webpage or PDF
- Customise with CSS and Jinja
- Responsive Bootstrap layout
Basic Usage
import esparto as es
# Do some analysis
pandas_df = ...
plot_fig = ...
markdown_str = ...
# Create a page
page = es.Page(title="My Report")
# Add content
page["Data Analysis"]["Plot"] = plot_fig
page["Data Analysis"]["Data"] = pandas_df
page["Data Analysis"]["Notes"] = markdown_str
# Save to HTML or PDF
page.save_html("my-report.html")
page.save_pdf("my-report.pdf")
Installation
esparto is available from PyPI and Conda:
pip install esparto
conda install esparto -c conda-forge
poetry add esparto
Dependencies
- python >= 3.6
- jinja2
- markdown
- BeautifulSoup
- PyYAML
Optional
- weasyprint (for PDF output)
License
Documentation
User guides, documentation, and examples are available on the project home page.
Contributions, Issues, and Requests
Feedback and contributions are welcome - please raise an issue or pull request on GitHub.
Examples
Iris Report - Webpage | PDF | Notebook