亚洲精品亚洲人成在线观看麻豆,在线欧美视频一区,亚洲国产精品一区二区动图,色综合久久丁香婷婷

              當(dāng)前位置:首頁 > IT技術(shù) > Windows編程 > 正文

              FastAPI hello-word
              2021-08-07 11:02:04

              from typing import Optional
              
              from fastapi import FastAPI
              
              app = FastAPI()
              
              
              @app.get("/")
              def read_root():
                  return {"Hello": "World"}
              
              
              @app.get("/items/{item_id}")
              def read_item(item_id: int, q: Optional[str] = None):
                  return {"item_id": item_id, "q": q}
              
              
              if __name__ == '__main__':
                  import uvicorn
              
                  uvicorn.run(app, host="localhost", port=8080)

              FastAPI hello-word_ico

              ?

              本文摘自 :https://blog.51cto.com/u

              開通會員,享受整站包年服務(wù)立即開通 >