ApiGateway

Qualified name: api.api_gateway.ApiGateway

class api.api_gateway.ApiGateway(proj)[source]

Bases: object

Entry point for the MORe API

Only this object needs to be imported and initialized by the API user. All other objects are created by this object.

Parameters:

proj (Project) – The project instance

Methods

create_postprocessor_setup

Creates a PostprocessorSetup object for managing postprocessing of experiments

create_project_handler_setup

Creates a ProjectHandlerSetup object for file handling operations, such as import, export, save and load

create_simulation_setup

Creates a SimulationSetup object for managing simulations

create_postprocessor_setup() PostprocessorSetup[source]

Creates a PostprocessorSetup object for managing postprocessing of experiments

Example

>>> from more.api import ApiGateway
>>> setup = ApiGateway(proj=proj).create_postprocessor_setup()
Returns:

A PostprocessorSetup instance for managing the postprocessor state

Return type:

PostprocessorSetup

create_project_handler_setup() ProjectHandlerSetup[source]

Creates a ProjectHandlerSetup object for file handling operations, such as import, export, save and load

Example

>>> from more.api import ApiGateway
>>> setup = ApiGateway(proj=proj).create_project_handler_setup()
Returns:

A ProjectHandlerSetup instance for managing file operations

Return type:

ProjectHandlerSetup

create_simulation_setup() SimulationSetup[source]

Creates a SimulationSetup object for managing simulations

Example

>>> from more.api import ApiGateway
>>> setup = ApiGateway(proj=proj).create_simulation_setup()
Returns:

A SimulationSetup instance for managing the simulation state

Return type:

SimulationSetup