create_app#

mobu.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 some routing depends on configuration settings and we therefore want to recreate the application between tests.

Parameters:

load_config (bool, default: True) – If set to False, do not try to load 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