上一页 1 2 3 4 5 6 7 8 9 ··· 17 下一页
摘要: from fastapi import FastAPI app = FastAPI() @app.middleware("http") async def middleware2(request, call_next): print("中间件2 start") response = await ca 阅读全文
posted @ 2026-03-03 23:15 Clefairy 阅读(5) 评论(0) 推荐(0)
摘要: from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() @app.get("/") async def root(): return {"message": "Hello World"} # 需求:新闻接口 阅读全文
posted @ 2026-03-03 23:15 Clefairy 阅读(6) 评论(0) 推荐(0)
摘要: from fastapi import FastAPI from fastapi.responses import FileResponse app = FastAPI() @app.get("/") async def root(): return {"message": "Hello World 阅读全文
posted @ 2026-03-03 23:14 Clefairy 阅读(3) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 ··· 17 下一页