report.ReportTemplate#

class ReportTemplate#

Bases: Flow360BaseModel

A model representing a report containing various components such as summaries, inputs, tables, and charts in both 2D and 3D.

Attributes

title: str, optional#

Title of report, shown on the first page.

Default:

None

items: list[Summary | Inputs | Table | NonlinearResiduals | Chart2D | Chart3D]#

A list of report items, each of which can be a summary, input data, table, 2D chart, or 3D chart.

include_case_by_case: bool#

Flag indicating whether to include a case-by-case analysis in the report.

Default:

False

settings: Settings, optional#
Default:

Settings()

Additional Constructors

classmethod from_file(filename)#

Load a Flow360BaseModel from a .json file.

Parameters:

filename (str)

Return type:

Flow360BaseModel

Methods

get_requirements()#

Collects and returns unique requirements from all items.

This method iterates over all items, retrieves each item’s requirements, and aggregates them into a unique list.

Returns:

A list of unique requirements aggregated from all items.

Return type:

list

create_in_cloud(name, cases, landscape=False, solver_version='release-25.9')#

Creates a report in the cloud for a specified set of cases.

Parameters:
  • name (str) – The name of the report to create.

  • cases (list[Case]) – A list of Case instances to include in the report.

  • landscape (bool, default=False) – Orientation of the report, where True represents landscape.

  • solver_version (str, optional) – Version of the solver for report generation.

Returns:

The response from the Report API submission.

Return type:

Response

create_pdf(filename, cases, landscape=True, data_storage='.', shutter_url=None, shutter_access_token=None, shutter_screenshot_process_function=None, process_screenshot_in_parallel=True)#

Generates a PDF report for a specified set of cases.

Parameters:
  • filename (str) – The name of the output PDF file.

  • cases (list[Case]) – A list of Case instances to include in the PDF report.

  • landscape (bool, default=False) – Orientation of the report, where True represents landscape.

  • data_storage (str, default=".") – Directory where the PDF file will be saved.

  • shutter_url (str)

  • shutter_access_token (str)

  • shutter_screenshot_process_function (Callable)

  • process_screenshot_in_parallel (bool)

Return type:

None

help(methods=False)#

Print fields and methods of a Flow360BaseModel using rich.

Parameters:

methods (bool)

Return type:

None

to_file(filename, **kwargs)#

Export Flow360BaseModel instance to a .json file.

Parameters:
Return type:

None