코딩(Coding)/파이썬(Python)1 [FastAPI] 경로 인자/변수 (Path Parameters) Path Parameters item_id 를 통한 인자 설정 You can declare path parameters or variables with the same syntax used by Python format strings 경로의 파라미터들이나 변수들을 Python format strings 을 사용하여 정의할 수 있다. from fastapi import FastAPI app = FastAPI() @app.get("/items/{item_id}") async def read_item(item_id): return {"item_id": item_id} The value of the path parameter item_id will be passed to your function as the a.. 코딩(Coding)/파이썬(Python) 2022. 12. 11. 이전 1 다음