コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 3 of about 3 for bartenders (0.002 sec.)
ボディ - 更新 11849
ボディ - 更新 PUT による置換での更新 項目を更新するには HTTPの PUT 操作を使用することができます。 jsonable_encoder を用いて、入力データをJSON形式で保存できるデータに変換することができます(例:NoSQLデータベース)。例えば、 datetime を str に ... : List [ str ] = [] items = { "foo" : { "name" : "Foo" , "price" : 50.2 }, "bar" : { "name" : "Bar" , "description" : "The bartenders" , "price" : 62 , "tax" : 20.2 }, "baz" : { "name" : "Baz" , "description" : None , "price" : 50.2 , "tax" : 10.5 , "tags" ... : list [ str ] = [] items = { "foo" : { "name" : "Foo" , "price" : 50.2 }, "bar" : { "name" : "Bar" , "description" : "The bartenders" , "price" : 62 , "tax" : 20.2 }, "baz" : { "name" : "Baz" , "description" : None , "price" : 50.2 , "tax" : 10.5 , "tags" ... : list [ str ] = [] items = { "foo" : { "name" : "Foo" , "price" : 50.2 }, "bar" : { "name" : "Bar" , "description" : "The bartenders" , "price" : 62 , "tax" : 20.2 }, "baz" : { "name" : "Baz" , "description" : None , "price" : 50.2 , "tax" : 10.5 , "tags" ...
https://man.mtool.work/fastapi/0.115/tutorial/body-updates/
レスポンスモデル 8538
レスポンスモデル path operations のいずれにおいても、 response_model パラメータを使用して、レスポンスのモデルを宣言することができます: @app.get() @app.post() @app.put() @app.delete() など。 Python 3.8+ from typing import Any , List , Union ... : List [ str ] = [] items = { "foo" : { "name" : "Foo" , "price" : 50.2 }, "bar" : { "name" : "Bar" , "description" : "The bartenders" , "price" : 62 , "tax" : 20.2 }, "baz" : { "name" : "Baz" , "description" : None , "price" : 50.2 , "tax" : 10.5 , "tags" ... : list [ str ] = [] items = { "foo" : { "name" : "Foo" , "price" : 50.2 }, "bar" : { "name" : "Bar" , "description" : "The bartenders" , "price" : 62 , "tax" : 20.2 }, "baz" : { "name" : "Baz" , "description" : None , "price" : 50.2 , "tax" : 10.5 , "tags" ... : list [ str ] = [] items = { "foo" : { "name" : "Foo" , "price" : 50.2 }, "bar" : { "name" : "Bar" , "description" : "The bartenders" , "price" : 62 , "tax" : 20.2 }, "baz" : { "name" : "Baz" , "description" : None , "price" : 50.2 , "tax" : 10.5 , "tags" ...
https://man.mtool.work/fastapi/0.115/tutorial/response-model/
テスト 7496
テスト Starlette のおかげで、 FastAPI アプリケーションのテストは簡単で楽しいものになっています。 HTTPX がベースなので、非常に使いやすく直感的です。 これを使用すると、 FastAPI と共に pytest を直接利用できます。 TestClient を使用 TestClient を ... "title" : "Foo" , "description" : "There goes my hero" }, "bar" : { "id" : "bar" , "title" : "Bar" , "description" : "The bartenders" }, } app = FastAPI () class Item ( BaseModel ): id : str title : str description : str | None = None @app . get ( "/items ... "title" : "Foo" , "description" : "There goes my hero" }, "bar" : { "id" : "bar" , "title" : "Bar" , "description" : "The bartenders" }, } app = FastAPI () class Item ( BaseModel ): id : str title : str description : str | None = None @app . get ( "/items ... "title" : "Foo" , "description" : "There goes my hero" }, "bar" : { "id" : "bar" , "title" : "Bar" , "description" : "The bartenders" }, } app = FastAPI () class Item ( BaseModel ): id : str title : str description : Union [ str , None ] = None @app . get ...
https://man.mtool.work/fastapi/0.115/tutorial/testing/
PREV 1 NEXT