fastapi User Guide (path parameters, query parameters, request body)

learn from https://fastapi.tiangolo.com/zh/tutorial/ 1. Step 1 pip install fastapi[all] from fastapi import FastAPI my_app = FastAPI() # my_app instance, whose name corresponds to that in the terminal @my_app.get("/") async def root(): return {"message" : "Hello World"} http operation: POST: create data. GET: read data. PUT: upd ...

Posted by dross613 on Thu, 30 Sep 2021 21:05:11 +0200