コンテンツにスキップ
per page, with , order by , clip by
Results of 1 - 1 of about 1 for 列挙型 (0.001 sec.)
パスパラメータ 9414
パスパラメータ Pythonのformat文字列と同様のシンタックスで「パスパラメータ」や「パス変数」を宣言できます: Python 3.8+ from fastapi import FastAPI app = FastAPI () @app . get ( "/items/ {item_id} " ) async def read_item ( item_id ): return { ... ドキュメントの確認 パスパラメータ の利用可能な値が事前に定義されているので、対話的なドキュメントで適切に表示できます: Python 列挙型 の利用 パスパラメータ の値は 列挙型メンバ となります。 列挙型メンバ の比較 これは、作成した列挙型 ModelName の 列挙型メンバ ... _name" : model_name , "message" : "Have some residuals" } 豆知識 ModelName.lenet.value でも "lenet" 値にアクセスできます。 列挙型メンバ の返却 path operation から 列挙型メンバ を返すことができます。JSONボディ( dict など)でネストすることもできます。 そ ...
https://man.mtool.work/fastapi/0.115/tutorial/path-params/
PREV 1 NEXT