摘要: from fastapi import FastAPI app= FastAPI() # 静态路由优先级高于动态路由 # 必须写在动态路由的前面 @app.get("/books/most_populer") def books_most_populer(): return {"This Book 阅读全文
posted @ 2023-03-21 16:42 LeoShi2020 阅读(121) 评论(0) 推荐(0) 编辑
摘要: from fastapi import FastAPI app= FastAPI() # 静态路由模式 @app.get("/login") def login(): return {"msg":"Welcome CoCo Login"} @app.get("/books/{number}") # 阅读全文
posted @ 2023-03-21 16:29 LeoShi2020 阅读(34) 评论(0) 推荐(0) 编辑