Skip to main content

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()

html_sample

Installation

  1. pip3 install git+https://github.com/fnatanoy/reportity.git#egg=reportity
  2. pip3 install git+git://github.com/mpld3/mpld3@master#egg=mpld3

possible Problems

  1. If tinker is not installed - apt-get install python3-tk

Limitations

  1. 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

reportity-0.2.tar.gz (86.6 kB view details)

Uploaded Source

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

Hashes for reportity-0.2.tar.gz
Algorithm Hash digest
SHA256 7532880ef762825097f9d76cccefd9ecf75bca3cf7c06d3e8231c4688aae6126
MD5 c1b18b6fbdfc0bbd845074cf861084ca
BLAKE2b-256 61223db4f5e5b454fa23d8a75e87807bbf3b5360ea100a7be1c43321b27e58cb

See more details on using hashes here.

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