App下載

詞條

大約有 50 項(xiàng)符合查詢結(jié)果 ,庫內(nèi)數(shù)據(jù)總量為 78,250 項(xiàng)。(搜索耗時:0.0025秒)

11.FastAPI教程 - 用戶指南 - 簡介

本教程將一步步向你展示如何使用 FastAPI 的絕大部分特性。 各個章節(jié)的內(nèi)容循序漸進(jìn),但是又圍繞著單獨(dú)的主題,所以你可以直接跳轉(zhuǎn)到某個章節(jié)以解決你的特定需求。 本教程同樣可以作為將來的參考手冊。 你可以隨時回到本...

http://www.o2fo.com/fastapi/fastapi-tutorial.html

12.FastAPI教程 響應(yīng) - 更改狀態(tài)代碼

...)。然后您可以status_code在該時間響應(yīng)對象中設(shè)置 。from fastapi import FastAPI, Response, status app = FastAPI() tasks = {"foo": "Listen to the Bar Fighters"} @app.put("/get-or-create-task/{task_id}", status_code=200) def get_or_create_task(task_id: str, response: Response): if tas...

http://www.o2fo.com/fastapi/fastapi-62vd3ldm.html

13.FastAPI教程 高級用戶指南 - 簡介

額外特性主要的教程 教程 - 用戶指南 應(yīng)該足以讓你了解 FastAPI 的所有主要特性。你會在接下來的章節(jié)中了解到其他的選項(xiàng)、配置以及額外的特性。Tip接下來的章節(jié)并不一定是「高級的」。而且對于你的使用場景來說,解決方案...

http://www.o2fo.com/fastapi/fastapi-o9ug3lde.html

14.FastAPI教程 直接返回響應(yīng)

當(dāng)你創(chuàng)建一個 FastAPI 路徑操作 時,你可以正常返回以下任意一種數(shù)據(jù):dict,list,Pydantic 模型,數(shù)據(jù)庫模型等等。FastAPI 默認(rèn)會使用 jsonable_encoder 將這些類型的返回值轉(zhuǎn)換成 JSON 格式,jsonable_encoder 在 JSON 兼容編碼器 中有闡述。...

http://www.o2fo.com/fastapi/fastapi-5wmk3ldh.html

15.FastAPI教程 路徑操作的高級配置

...Id。務(wù)必確保每個操作路徑的 operation_id 都是唯一的。from fastapi import FastAPI app = FastAPI() @app.get("/items/", operation_id="some_specific_id_you_define") async def read_items(): return [{"item_id": "Foo"}] 使用 路徑操作函數(shù) 的函數(shù)名作為 operationId如果你想...

http://www.o2fo.com/fastapi/fastapi-n5zp3ldf.html

16.FastAPI教程 Header 參數(shù)

...數(shù)。 導(dǎo)入 Header 首先導(dǎo)入 Header:from typing import Optional from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(user_agent: Optional[str] = Header(None)): return {"User-Agent": user_agent} 聲明 Header 參數(shù) 然后使用和Path, Query and Cookie ...

http://www.o2fo.com/fastapi/fastapi-x5pl3lcd.html

17.FastAPI教程 響應(yīng)狀態(tài)碼

...態(tài)碼: @app.get() @app.post() @app.put() @app.delete() 等等。 from fastapi import FastAPI app = FastAPI() @app.post("/items/", status_code=201) async def create_item(name: str): return {"name": name} Note 注意,status_code 是「裝飾器」方法(get,post 等)的一個參數(shù)。不像...

http://www.o2fo.com/fastapi/fastapi-ynmu3lcg.html

18.FastAPI教程 中間件

你可以向 FastAPI 應(yīng)用添加中間件."中間件"是一個函數(shù),它在每個請求被特定的路徑操作處理之前,以及在每個響應(yīng)返回之前工作.它接收你的應(yīng)用程序的每一個請求.然后它可以對這個請求做一些事情或者執(zhí)行任何需要的代碼.然后它...

http://www.o2fo.com/fastapi/fastapi-6mfq3ld1.html

19.FastAPI教程 請求體 - 字段

...入 Field 首先,你必須導(dǎo)入它:from typing import Optional from fastapi import Body, FastAPI from pydantic import BaseModel, Field app = FastAPI() class Item(BaseModel): name: str description: Optional[str] = Field( None, title="The description of the item", max_length=300 ) price: float = ...

http://www.o2fo.com/fastapi/fastapi-cgix3lc8.html

20.FastAPI教程 模式的額外信息 - 例子

...Pydantic 文檔:定制 Schema 中所述:from typing import Optional from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Optional[str] = None price: float tax: Optional[float] = None class Config: schema_extra = { "example": { "na...

http://www.o2fo.com/fastapi/fastapi-uzn13lca.html

抱歉,暫時沒有相關(guān)的微課

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

抱歉,暫時沒有相關(guān)的視頻課程

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

抱歉,暫時沒有相關(guān)的教程

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

11.FastAPI教程 - 用戶指南 - 簡介

本教程將一步步向你展示如何使用 FastAPI 的絕大部分特性。 各個章節(jié)的內(nèi)容循序漸進(jìn),但是又圍繞著單獨(dú)的主題,所以你可以直接跳轉(zhuǎn)到某個章節(jié)以解決你的特定需求。 本教程同樣可以作為將來的參考手冊。 你可以隨時回到本...

http://www.o2fo.com/fastapi/fastapi-tutorial.html

12.FastAPI教程 響應(yīng) - 更改狀態(tài)代碼

...)。然后您可以status_code在該時間響應(yīng)對象中設(shè)置 。from fastapi import FastAPI, Response, status app = FastAPI() tasks = {"foo": "Listen to the Bar Fighters"} @app.put("/get-or-create-task/{task_id}", status_code=200) def get_or_create_task(task_id: str, response: Response): if tas...

http://www.o2fo.com/fastapi/fastapi-62vd3ldm.html

13.FastAPI教程 高級用戶指南 - 簡介

額外特性主要的教程 教程 - 用戶指南 應(yīng)該足以讓你了解 FastAPI 的所有主要特性。你會在接下來的章節(jié)中了解到其他的選項(xiàng)、配置以及額外的特性。Tip接下來的章節(jié)并不一定是「高級的」。而且對于你的使用場景來說,解決方案...

http://www.o2fo.com/fastapi/fastapi-o9ug3lde.html

14.FastAPI教程 直接返回響應(yīng)

當(dāng)你創(chuàng)建一個 FastAPI 路徑操作 時,你可以正常返回以下任意一種數(shù)據(jù):dict,list,Pydantic 模型,數(shù)據(jù)庫模型等等。FastAPI 默認(rèn)會使用 jsonable_encoder 將這些類型的返回值轉(zhuǎn)換成 JSON 格式,jsonable_encoder 在 JSON 兼容編碼器 中有闡述。...

http://www.o2fo.com/fastapi/fastapi-5wmk3ldh.html

15.FastAPI教程 路徑操作的高級配置

...Id。務(wù)必確保每個操作路徑的 operation_id 都是唯一的。from fastapi import FastAPI app = FastAPI() @app.get("/items/", operation_id="some_specific_id_you_define") async def read_items(): return [{"item_id": "Foo"}] 使用 路徑操作函數(shù) 的函數(shù)名作為 operationId如果你想...

http://www.o2fo.com/fastapi/fastapi-n5zp3ldf.html

16.FastAPI教程 Header 參數(shù)

...數(shù)。 導(dǎo)入 Header 首先導(dǎo)入 Header:from typing import Optional from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items(user_agent: Optional[str] = Header(None)): return {"User-Agent": user_agent} 聲明 Header 參數(shù) 然后使用和Path, Query and Cookie ...

http://www.o2fo.com/fastapi/fastapi-x5pl3lcd.html

17.FastAPI教程 響應(yīng)狀態(tài)碼

...態(tài)碼: @app.get() @app.post() @app.put() @app.delete() 等等。 from fastapi import FastAPI app = FastAPI() @app.post("/items/", status_code=201) async def create_item(name: str): return {"name": name} Note 注意,status_code 是「裝飾器」方法(get,post 等)的一個參數(shù)。不像...

http://www.o2fo.com/fastapi/fastapi-ynmu3lcg.html

18.FastAPI教程 中間件

你可以向 FastAPI 應(yīng)用添加中間件."中間件"是一個函數(shù),它在每個請求被特定的路徑操作處理之前,以及在每個響應(yīng)返回之前工作.它接收你的應(yīng)用程序的每一個請求.然后它可以對這個請求做一些事情或者執(zhí)行任何需要的代碼.然后它...

http://www.o2fo.com/fastapi/fastapi-6mfq3ld1.html

19.FastAPI教程 請求體 - 字段

...入 Field 首先,你必須導(dǎo)入它:from typing import Optional from fastapi import Body, FastAPI from pydantic import BaseModel, Field app = FastAPI() class Item(BaseModel): name: str description: Optional[str] = Field( None, title="The description of the item", max_length=300 ) price: float = ...

http://www.o2fo.com/fastapi/fastapi-cgix3lc8.html

20.FastAPI教程 模式的額外信息 - 例子

...Pydantic 文檔:定制 Schema 中所述:from typing import Optional from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Optional[str] = None price: float tax: Optional[float] = None class Config: schema_extra = { "example": { "na...

http://www.o2fo.com/fastapi/fastapi-uzn13lca.html

抱歉,暫時沒有相關(guān)的文章

w3cschool 建議您:

  • 檢查輸入的文字是否有誤

熱門課程