Skip to content

Reports

Once you have built up the blocks that make up your report, you can use the following function to save it as an offline local report.

save_report

Save the app document to a local HTML file

Parameters:

Name Type Description Default
blocks BlocksT

The Blocks object or a list of Blocks

required
path str

File path to store the document

required
open bool

Open in your browser after creating (default: False)

False
name str

Name of the document (optional: uses path if not provided)

'Report'
formatting Optional[Formatting]

Sets the basic app styling

None

build_report

Build an (static) app with a directory structure, which can be served by a local http server

Note

This outputs compressed assets into the dir as well, may be an issue if self-hosting

Parameters:

Name Type Description Default
blocks BlocksT

The Blocks object or a list of Blocks

required
name str

The name of the app directory to be created

'Report'
dest Optional[NPath]

File path to store the app directory

None
formatting Optional[Formatting]

Sets the basic app styling

None
overwrite bool

Replace existing app with the same name and destination if already exists (default: False)

False

Warning

Report uploading (i.e. dp.upload_report()) to Datapane Cloud is no longer supported.