""" FastAPI Application Entry Point This module initializes and configures the FastAPI application with: - CORS middleware for cross-origin requests - Request timing middleware for performance monitoring - Custom exception handlers for consistent error responses - Prometheus instrumentation for metrics - API routers for endpoint organization """ import uvicorn import routers from create_file import create_app from prometheus_fastapi_instrumentator import Instrumentator from app_handler import setup_middleware, get_uvicorn_config app = create_app(routers=routers) # Initialize FastAPI application Instrumentator().instrument(app=app).expose(app=app) # Setup Prometheus metrics setup_middleware(app) # Configure middleware and exception handlers if __name__ == "__main__": uvicorn_config = get_uvicorn_config() # Run the application with Uvicorn uvicorn.Server(uvicorn.Config(**uvicorn_config)).run()