this is the best package for reports
Project description
REPORTITY
Description
Reportity is an easy to use library for displaying figures/dataframes and text. Reportity generates an interactive html report on the fly and execute it at the end of the run.
NO MORE JUPYTER!!!
Example
For the full example code look at the examples folder
The following code display dataframe and figure -
report = reportity.Reportity(
title='Reportity Example',
)
report.print_header(
text='Description',
level=1,
)
report.print_paragraph(
text='This is an example of Reportity'
)
report.print_header(
text='Data',
level=2,
)
report.print_paragraph(
text='The data'
)
report.print_dataframe(
dataframe=dataframe,
max_rows=5,
)
report.print_header(
text='Figures',
level=2,
)
report.print_figure(
figure=fig1,
)
report.show()
Installation
- pip3 install git+https://github.com/fnatanoy/reportity.git#egg=reportity
- pip3 install git+git://github.com/mpld3/mpld3@master#egg=mpld3
possible Problems
- If tinker is not installed - apt-get install python3-tk
Limitations
- Some complicated figures might not rendered to Javascript or will get messed up. In this case you can use the print_figure method with the parameter image=True. This will show the figure as an image and not an interactive Javascript figure
report.print_figure(
figure=fig,
image=True,
)
Usage
Create reportity object with a title
report = reportity.Reportity(
title='Repority Title',
)
Add header and give it a level
report.print_header(
text='Header name with level 1',
level=1,
)
Add paragraph
report.print_paragraph(
text='This is paragraph text'
)
Add dataframe, you can choose maximum rows to display
report.print_dataframe(
dataframe=dataframe,
max_rows=5,
)
Add figure, If image=True than the figure will be an image and not interactive figure, use it when the figure is not displaying correctly
report.print_figure(
figure=fig,
image=False,
)
Save report as html
report.save_as_html(
path='destination_folder/report.html',
)
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
File details
Details for the file reportity-0.2.tar.gz
.
File metadata
- Download URL: reportity-0.2.tar.gz
- Upload date:
- Size: 86.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/2.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7532880ef762825097f9d76cccefd9ecf75bca3cf7c06d3e8231c4688aae6126 |
|
MD5 | c1b18b6fbdfc0bbd845074cf861084ca |
|
BLAKE2b-256 | 61223db4f5e5b454fa23d8a75e87807bbf3b5360ea100a7be1c43321b27e58cb |