Spaces:
Sleeping
Sleeping
| from fastapi import FastAPI | |
| from sabiduria_tool_api.core.config import API_PREFIX, APP_NAME, APP_VERSION | |
| from sabiduria_tool_api.core.event_handler import start_app_handler, stop_app_handler | |
| from sabiduria_tool_api.api.routes.router import api_router | |
| def get_app() -> FastAPI: | |
| fast_app = FastAPI(title=APP_NAME, version=APP_VERSION) | |
| fast_app.include_router(api_router, prefix=API_PREFIX) | |
| fast_app.add_event_handler("startup", start_app_handler(fast_app)) | |
| fast_app.add_event_handler("shutdown", stop_app_handler(fast_app)) | |
| return fast_app | |
| app = get_app() | |