esparto is a Python library for building data driven reports with content from popular analytics packages.
- 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
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")
esparto is available from PyPI and Conda:
pip install esparto
conda install esparto -c conda-forge
poetry add esparto
- python >= 3.6
- jinja2
- markdown
- BeautifulSoup
- PyYAML
- weasyprint (for PDF output)
User guides, documentation, and examples are available on the project home page.
Feedback and contributions are welcome - please raise an issue or pull request on GitHub.
Iris Report - Webpage | PDF | Notebook