app.main module¶
- app.main.lifespan(app)[source]¶
FastAPI lifespan context manager handling graceful shutdown.
Yields immediately on startup (no startup work needed) and, on shutdown, flushes the buffered DSL execution-log queue so a graceful stop does not drop pending audit rows. The flush is best-effort: failures are logged and swallowed so they never block shutdown.
- Parameters:
app (FastAPI) – The application instance whose
statemay hold thedsl_execution_observerto flush.
- app.main.get_project_data()[source]¶
Retrieves project data from the pyproject.toml file.
- Returns:
dict – Project data from the toml file.
- app.main.get_swagger_oauth_config()[source]¶
Builds Swagger UI OAuth init configuration from environment-based settings.
- Returns:
dict – Swagger OAuth init configuration.
- Return type:
dict