Report
Base functionality for PDF data reports
PDF
Bases: FPDF
PDF document customized for data reports
Extends the methods of fpdf.FPDF with common report methods and default settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
logo
|
str
|
Path to a logo image to include in the page header. |
None
|
line_height
property
Calculated text line height
footer()
Create footer section on current page
header()
Create header section on current page
horizontal_rule(y)
Create a horizontal divider line
insert_mpl_plot()
Insert the current Matplotlib plot
make_title(title, super_title=None)
section(text, add_page=True)
Create a section header
set_text_font()
Set default font size
subsection(text, add_page=False)
Create a sub-section header
Report
Abstract base class for data reports
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
author
|
str
|
Report author. |
None
|
body()
Create report contents
make()
Build the entire report
plot_context()
Context manager to insert a Matplotlib figure
row(*cell_texts)
Create a table row
save(path)
section(heading)
Create a new section
subsection(heading)
Create a new sub-section
table(widths=None, aligns=None)
text(text)
Write a simple line of text
title(title, super_title=None)
Create the title
plot(func)
Decorator marking report class methods as plots