Esparto
Data driven report builder for the Python data ecosystem.
Install / Use
/learn @domvwt/EspartoREADME
<a href="https://pypi.python.org/pypi/esparto/"><img src="https://img.shields.io/pypi/pyversions/esparto.svg"></img></a> <img src="https://github.com/domvwt/esparto/actions/workflows/lint-and-test.yml/badge.svg"></img> <a href="https://codecov.io/gh/domvwt/esparto"><img src="https://codecov.io/gh/domvwt/esparto/branch/main/graph/badge.svg?token=35J8NZCUYC"></img></a> <a href="https://sonarcloud.io/dashboard?id=domvwt_esparto"><img src="https://sonarcloud.io/api/project_badges/measure?project=domvwt_esparto&metric=alert_status"></img></a>
</div> <br>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.
