Skip to main content

Simple HTML and PDF document generator for Python.

Project description

esparto

image Build Status codecov Quality Gate Status

Esparto is a simple HTML and PDF document generator for Python. Its primary use is for generating shareable single page reports with content from popular analytics and data science libraries.

Full documentation and examples are available at domvwt.github.io/esparto/.

Overview

The library features a streamlined API that defines pages in terms of sections, rows, and columns; and an intelligent wrapping system that automatically converts Python objects into content.

We use the grid system and components from Bootstrap to ensure documents adapt to the viewing device and appear immediately familiar and accessible. No knowledge of Bootstrap or web development is required to use the library, however, as these details are conveniently abstracted.

At publishing time, the completed document is passed to Jinja2 and fed into an HTML template with all style details and dependencies captured inline.

Esparto supports content rendering within Jupyter Notebooks, allowing users to interactively and iteratively build documents without disrupting their workflow.

PDF conversion is provided by Weasyprint.

Features

  • Lightweight API
  • No CSS or HTML required
  • Device responsive display
  • Self contained / inline dependencies
  • Jupyter Notebook support
  • Printer friendly formatting
  • PDF output
  • MIT License

Supported Content

  • Markdown
  • Images
  • Pandas DataFrames
  • Plots from:
    • Matplotlib
    • Bokeh
    • Plotly

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

esparto-0.2.5.tar.gz (39.2 kB view hashes)

Uploaded Source

Built Distribution

esparto-0.2.5-py3-none-any.whl (40.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page