@@ -3,98 +3,131 @@ esparto
33
44[ ![ image] ( https://img.shields.io/pypi/v/esparto.svg )] ( https://pypi.python.org/pypi/esparto )
55[ ![ PyPI pyversions] ( https://img.shields.io/pypi/pyversions/esparto.svg )] ( https://pypi.python.org/pypi/esparto/ )
6- [ ![ Build Status] ( https://travis-ci .com/domvwt/esparto.svg?branch=main )] ( https://travis-ci.com/domvwt/esparto )
6+ ![ Build Status] ( https://github .com/domvwt/esparto/actions/workflows/lint-and-test.yml/badge.svg )
77[ ![ codecov] ( https://codecov.io/gh/domvwt/esparto/branch/main/graph/badge.svg?token=35J8NZCUYC )] ( https://codecov.io/gh/domvwt/esparto )
88[ ![ Quality Gate Status] ( https://sonarcloud.io/api/project_badges/measure?project=domvwt_esparto&metric=alert_status )] ( https://sonarcloud.io/dashboard?id=domvwt_esparto )
99![ PyPI - Downloads] ( https://img.shields.io/pypi/dm/esparto )
1010
11+ Introduction
12+ ------------
1113
12- ## Introduction
13- ** esparto** is a Python package for building shareable reports with content
14- from popular data analysis libraries.
15- With just a few lines of code, ** esparto** turns DataFrames, plots, and
16- Markdown into an interactive webpage or PDF document.
14+ ** esparto** is a Python library for building data driven reports with content
15+ from popular analytics packages. The project takes a straightforward approach
16+ to document design; with a focus on usability, portability, and extensiblity.
1717
18- Documents produced by ** esparto** are completely portable - no backend server
19- is required - and entirely customisable using CSS and Jinja templating.
20- All content dependencies are declared inline or loaded via a CDN, meaning your
21- reports can be shared by email, hosted on a standard http server, or made
22- available as static pages as-is.
18+ Creating a report is as simple as instantiating a Page object and 'adding' content
19+ in the form of DataFrames, plots, and markdown text. Documents can be built interactively
20+ in a notebook environment, and the results shared as a self-contained HTML
21+ page or PDF file.
2322
23+ Further customisation of the output is possible by passing a CSS stylesheet,
24+ changing the [ Jinja] ( Jinja ) template, or declaring additional element styles within
25+ the code. The responsive [ Bootstrap] ( Bootstrap ) grid ensures documents adapt to
26+ any viewing device.
27+
28+ Basic Usage
29+ -----------
2430
25- ## Basic Usage
2631``` python
2732import esparto as es
33+
34+ # Do some analysis
35+ pandas_dataframe = ...
36+ plotly_figure = ...
37+
38+ # Create a Page object
2839page = es.Page(title = " My Report" )
29- page[" Data Analysis" ] = (pandas_dataframe, plotly_figure)
40+
41+ # Add content
42+ page[" Data Analysis" ][" Plot" ] = plotly_figure
43+ page[" Data Analysis" ][" Data" ] = pandas_dataframe
44+
45+ # Save to HTML or PDF
3046page.save_html(" my-report.html" )
47+ page.save_pdf(" my-report.pdf" )
48+
3149```
3250
51+ Main Features
52+ -------------
3353
34- ## Main Features
35- * Automatic and adaptive layout
36- * Customisable with CSS or Jinja
37- * Jupyter Notebook friendly
38- * Output as HTML or PDF
39- * Built-in adaptors for:
40- * Markdown
41- * Images
42- * [ Pandas DataFrames] [ Pandas ]
43- * [ Matplotlib] [ Matplotlib ]
44- * [ Bokeh] [ Bokeh ]
45- * [ Plotly] [ Plotly ]
54+ - Interactive document design with Jupyter Notebooks
55+ - Share as self-contained HTML or PDF
56+ - Customise with CSS and Jinja
57+ - Responsive Bootstrap grid layout
58+ - Content adaptors for:
59+ - [ Markdown] [ Markdown ]
60+ - [ Images] [ Pillow ]
61+ - [ Pandas DataFrames] [ Pandas ]
62+ - [ Matplotlib] [ Matplotlib ]
63+ - [ Bokeh] [ Bokeh ]
64+ - [ Plotly] [ Plotly ]
4665
66+ Installation
67+ ------------
4768
48- ## Installation
4969** esparto** is available from [ PyPI] [ PyPI ] and [ Conda] [ Conda ] :
70+
5071``` bash
5172pip install esparto
5273```
74+
5375``` bash
5476conda install esparto -c conda-forge
5577```
5678
57- If PDF output is required, [ Weasyprint] ( https://weasyprint.org/ ) must also be installed.
79+ Dependencies
80+ ------------
81+
82+ - [ python] ( https://python.org/ ) >= 3.6
83+ - [ jinja2] ( https://palletsprojects.com/p/jinja/ )
84+ - [ markdown] ( https://python-markdown.github.io/ )
85+ - [ BeautifulSoup] ( https://www.crummy.com/software/BeautifulSoup/ )
86+ - [ PyYAML] ( https://pyyaml.org/ )
5887
59- ## Dependencies
60- * [ python] ( https://python.org/ ) >= 3.6
61- * [ jinja2] ( https://palletsprojects.com/p/jinja/ )
62- * [ markdown] ( https://python-markdown.github.io/ )
63- * [ Pillow] ( https://python-pillow.org/ )
64- * [ PyYAML] ( https://pyyaml.org/ )
65- * [ weasyprint] ( https://weasyprint.org/ ) _ (optional - required for PDF output)_
88+ #### Optional
6689
90+ - [ Pillow] ( https://python-pillow.org/ ) * (for image content)*
91+ - [ weasyprint] ( https://weasyprint.org/ ) * (for PDF output)*
92+
93+ License
94+ -------
6795
68- ## License
6996[ MIT] ( https://opensource.org/licenses/MIT )
7097
98+ Documentation
99+ -------------
100+
101+ Documentation and examples are available at
102+ [ domvwt.github.io/esparto/] ( https://domvwt.github.io/esparto/ ) .
71103
72- ## Documentation
73- Full documentation and examples are available at [ domvwt.github.io/esparto/ ] ( https://domvwt.github.io/esparto/ ) .
104+ Contributions, Issues, and Requests
105+ -----------------------------------
74106
75- ## Contributions, Issues, and Requests
76- All feedback and contributions are welcome - please raise an issue or pull request on [ GitHub] [ GitHub ] .
107+ Feedback and contributions are welcome - please raise an issue or pull request
108+ on [ GitHub] [ GitHub ] .
77109
110+ Examples
111+ --------
78112
79- ## Examples
80113Iris Report - [ Webpage] ( https://domvwt.github.io/esparto/examples/iris-report.html ) |
81114[ PDF] ( https://domvwt.github.io/esparto/examples/iris-report.pdf )
82115
83- Bokeh and Plotly - [ Webpage] ( https://domvwt.github.io/esparto/examples/interactive-plots.html ) |
84- [ PDF] ( https://domvwt.github.io/esparto/examples/interactive-plots.pdf )
85-
86116<br >
87117
88118<p width =100% >
89- <img width =80 % src =" https://github.com/domvwt/esparto/blob/fdc0e787c0bc013d16667773e82e21c647b71d91 /docs/images/iris-report-compressed.png?raw=true " alt =" example page " style =" border-radius :0.5% ;" >
119+ <img width =100 % src =" https://github.com/domvwt/esparto/blob/1857f1d7411f12c37c96f8f5d60ff7012071851f /docs/images/iris-report-compressed.png?raw=true " alt =" example page " style =" border-radius :0.5% ;" >
90120</p >
91121
92- <!-- Links -->
122+ <!-- * Links -->
93123[ PyPI ] : https://pypi.org/project/esparto/
94124[ Conda ] : https://anaconda.org/conda-forge/esparto
95- [ Bootstrap ] : https://getbootstrap.com/docs/4.6/getting-started/introduction/
125+ [ Bootstrap ] : https://getbootstrap.com/
126+ [ Jinja ] : https://jinja.palletsprojects.com/
127+ [ Markdown ] : https://www.markdownguide.org/
128+ [ Pillow ] : https://python-pillow.org/
96129[ Pandas ] : https://pandas.pydata.org/
97130[ Matplotlib ] : https://matplotlib.org/
98- [ Bokeh ] : https://docs. bokeh.org/en/latest/index.html
131+ [ Bokeh ] : https://bokeh.org/
99132[ Plotly ] : https://plotly.com/
100133[ GitHub ] : https://github.com/domvwt/esparto
0 commit comments