- Sort Score
- Result 10 results
- Languages All
Results 121 - 130 of 834 for ITEM (0.01 sec)
-
docs/ko/docs/tutorial/body-multiple-params.md
/// ## 단일 본문 매개변수 삽입하기 Pydantic 모델 `Item`의 `item`을 본문 매개변수로 오직 한개만 갖고있다고 하겠습니다. 기본적으로 **FastAPI**는 직접 본문으로 예측할 것입니다. 하지만, 만약 모델 내용에 `item `키를 가진 JSON으로 예측하길 원한다면, 추가적인 본문 매개변수를 선언한 것처럼 `Body`의 특별한 매개변수인 `embed`를 사용할 수 있습니다: ```Python hl_lines="17" {!../../docs_src/body_multiple_params/tutorial005.py!} ``` 아래 처럼: ```Python item: Item = Body(..., embed=True) ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.2K bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial004_an_py310.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None class User(BaseModel): username: str full_name: str | None = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Item, user: User, importance: Annotated[int, Body(gt=0)],
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 643 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial005_py39.py
url: HttpUrl name: str class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: set[str] = set() image: Union[Image, None] = None @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item): results = {"item_id": item_id, "item": item}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 512 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial004.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None class User(BaseModel): username: str full_name: Union[str, None] = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Item, user: User, importance: int = Body(gt=0),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Mar 10 18:49:18 UTC 2023 - 653 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial004_an.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 703 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial004_an_py39.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None class User(BaseModel): username: str full_name: Union[str, None] = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Item, user: User,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 674 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial007.py
except yaml.YAMLError: raise HTTPException(status_code=422, detail="Invalid YAML") try: item = Item.model_validate(data) except ValidationError as e: raise HTTPException(status_code=422, detail=e.errors(include_url=False))
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 822 bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial005_py310.py
}, }, "summary": "Read Item Name", "operationId": "read_item_name_items__item_id__name_get", "parameters": [ { "required": True, "schema": {"title": "Item Id", "type": "string"}, "name": "item_id",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 6.2K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial001_py310.py
"summary": "Update Item", "operationId": "update_item_items__item_id__put", "parameters": [ { "name": "item_id", "in": "path", "required": True, "schema": {"type": "integer", "title": "Item Id"}, }
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.7K bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial002.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: Set[str] = set() @app.post("/items/", response_model=Item, tags=["items"]) async def create_item(item: Item): return item @app.get("/items/", tags=["items"]) async def read_items():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 580 bytes - Viewed (0)