create_app#

controller.main.create_app(*, load_config=True)#

Create the FastAPI application.

This is in a function rather than using a global variable (as is more typical for FastAPI) because we want to defer configuration loading until after the test suite has a chance to override the path to the configuration file.

Parameters:

load_config (bool, default: True) – If set to False, do not try to load the configuration and skip any setup that requires the configuration. This is used primarily for OpenAPI schema generation, where constructing the app is required but the configuration won’t matter.

Return type:

FastAPI