- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 12 for body_fields (0.21 seconds)
-
fastapi/dependencies/utils.py
): return True return False async def _extract_form_body( body_fields: list[ModelField], received_body: FormData, ) -> dict[str, Any]: values = {} for field in body_fields: value = _get_multidict_value(field, received_body) field_info = field.field_info if (Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 38.7K bytes - Click Count (3) -
docs/zh-hant/docs/tutorial/body-fields.md
## 匯入 `Field` { #import-field } 首先,你需要匯入它: {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *} /// warning 請注意,`Field` 是直接從 `pydantic` 匯入的,不像其他(如 `Query`、`Path`、`Body` 等)是從 `fastapi` 匯入。 /// ## 宣告模型屬性 { #declare-model-attributes } 接著你可以在模型屬性上使用 `Field`: {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[11:14] *} `Field` 的用法與 `Query`、`Path`、`Body` 相同,擁有相同的參數等。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:15:26 GMT 2026 - 2.3K bytes - Click Count (0) -
docs/ja/docs/tutorial/body-fields.md
## `Field`のインポート { #import-field } まず、以下のようにインポートします: {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *} /// warning | 注意 `Field`は他の全てのもの(`Query`、`Path`、`Body`など)とは違い、`fastapi`からではなく、`pydantic`から直接インポートされていることに注意してください。 /// ## モデルの属性の宣言 { #declare-model-attributes } 以下のように`Field`をモデルの属性として使用することができます: {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[11:14] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 04 16:44:21 GMT 2026 - 3K bytes - Click Count (0) -
docs/zh/docs/tutorial/body-fields.md
## 导入 `Field` { #import-field } 首先,从 Pydantic 中导入 `Field`: {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *} /// warning | 警告 注意,与从 `fastapi` 导入 `Query`,`Path`、`Body` 不同,要直接从 `pydantic` 导入 `Field` 。 /// ## 声明模型属性 { #declare-model-attributes } 然后,使用 `Field` 定义模型的属性: {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[11:14] *} `Field` 的工作方式和 `Query`、`Path`、`Body` 相同,参数也相同。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:39:41 GMT 2026 - 2.1K bytes - Click Count (0) -
docs/tr/docs/tutorial/body-fields.md
## `Field`'ı import edin { #import-field } Önce import etmeniz gerekir: {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *} /// warning | Uyarı `Field`'ın, diğerlerinin (`Query`, `Path`, `Body` vb.) aksine `fastapi`'den değil doğrudan `pydantic`'den import edildiğine dikkat edin. ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 05 15:43:38 GMT 2026 - 2.7K bytes - Click Count (0) -
docs/de/docs/tutorial/body-fields.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 07:57:30 GMT 2026 - 2.7K bytes - Click Count (0) -
docs/fr/docs/tutorial/body-fields.md
## Importer `Field` { #import-field } D'abord, vous devez l'importer : {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *} /// warning | Alertes Notez que `Field` est importé directement depuis `pydantic`, et non depuis `fastapi` comme le sont les autres (`Query`, `Path`, `Body`, etc.). ///Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:12:41 GMT 2026 - 2.9K bytes - Click Count (0) -
docs/ko/docs/tutorial/body-fields.md
## `Field` 임포트 { #import-field } 먼저 이를 임포트해야 합니다: {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *} /// warning | 경고 `Field`는 다른 것들처럼 (`Query`, `Path`, `Body` 등) `fastapi`에서가 아닌 `pydantic`에서 바로 임포트 되는 점에 주의하세요. /// ## 모델 어트리뷰트 선언 { #declare-model-attributes } 그 다음 모델 어트리뷰트와 함께 `Field`를 사용할 수 있습니다: {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[11:14] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:57:01 GMT 2026 - 2.9K bytes - Click Count (0) -
tests/test_tutorial/test_body_fields/test_tutorial001.py
pytest.param("tutorial001_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body_fields.{request.param}") client = TestClient(mod.app) return client def test_items_5(client: TestClient): response = client.put("/items/5", json={"item": {"name": "Foo", "price": 3.0}})
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 6.9K bytes - Click Count (0) -
fastapi/openapi/utils.py
def get_openapi_operation_request_body( *, body_field: ModelField | None, model_name_map: ModelNameMap, field_mapping: dict[ tuple[ModelField, Literal["validation", "serialization"]], dict[str, Any] ], separate_input_output_schemas: bool = True, ) -> dict[str, Any] | None: if not body_field: return None assert isinstance(body_field, ModelField)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Mar 15 11:44:39 GMT 2026 - 25.6K bytes - Click Count (0)