from fastapi import FastAPI def create_app(): app = FastAPI() # 添加路由 from src.api import index app.include_router(index.router, prefix="/api/v1", tags=["API首页"]) return app fast_api_app = create_app()