mainframe.server

Attributes

app

Functions

add_correlation(→ dict[str, Any])

Add request id to log message.

setup_logging()

lifespan(app_)

Load the state for the app

metadata(→ mainframe.models.schemas.ServerMetadata)

Get server metadata

update_rules()

Update the rules

Module Contents

mainframe.server.add_correlation(logger: logging.Logger, method_name: str, event_dict: dict[str, Any]) dict[str, Any][source]

Add request id to log message.

mainframe.server.setup_logging()[source]
async mainframe.server.lifespan(app_: fastapi.FastAPI)[source]

Load the state for the app

mainframe.server.app[source]
async mainframe.server.metadata() mainframe.models.schemas.ServerMetadata[source]

Get server metadata

async mainframe.server.update_rules()[source]

Update the rules