Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for body_fields (0.04 sec)

  1. docs/ru/docs/tutorial/body-fields.md

    ## Импорт `Field` { #import-field }
    
    Сначала вы должны импортировать его:
    
    {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *}
    
    /// warning | Внимание
    
    Обратите внимание, что функция `Field` импортируется непосредственно из `pydantic`, а не из `fastapi`, как все остальные функции (`Query`, `Path`, `Body` и т.д.).
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Sep 30 11:24:39 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  2. docs/pt/docs/tutorial/body-fields.md

    Primeiro, você tem que importá-lo:
    
    {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *}
    
    /// warning | Atenção
    
    Note que `Field` é importado diretamente do `pydantic`, não do `fastapi` como todo o resto (`Query`, `Path`, `Body`, etc).
    
    ///
    
    ## Declare atributos do modelo { #declare-model-attributes }
    
    Você pode então utilizar `Field` com atributos do modelo:
    
    {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[11:14] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 12 16:23:57 UTC 2025
    - 2.6K bytes
    - Viewed (0)
  3. fastapi/dependencies/utils.py

            and not is_union_of_base_models(first_field.type_)
        ):
            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 (
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 37.6K bytes
    - Viewed (3)
  4. docs/de/docs/tutorial/body-fields.md

    ## `Field` importieren { #import-field }
    
    Importieren Sie es zuerst:
    
    {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *}
    
    /// warning | Achtung
    
    Beachten Sie, dass `Field` direkt von `pydantic` importiert wird, nicht von `fastapi`, wie die anderen (`Query`, `Path`, `Body`, usw.)
    
    ///
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Sep 20 15:10:09 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  5. docs/ja/docs/tutorial/body-fields.md

    ## `Field`のインポート
    
    まず、以下のようにインポートします:
    
    {* ../../docs_src/body_fields/tutorial001.py hl[4] *}
    
    /// warning | 注意
    
    `Field`は他の全てのもの(`Query`、`Path`、`Body`など)とは違い、`fastapi`からではなく、`pydantic`から直接インポートされていることに注意してください。
    
    ///
    
    ## モデルの属性の宣言
    
    以下のように`Field`をモデルの属性として使用することができます:
    
    {* ../../docs_src/body_fields/tutorial001.py hl[11,12,13,14] *}
    
    `Field`は`Query`や`Path`、`Body`と同じように動作し、全く同様のパラメータなどを持ちます。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Jun 22 14:34:53 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  6. docs/es/docs/tutorial/body-fields.md

    ## Importar `Field` { #import-field }
    
    Primero, tienes que importarlo:
    
    {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *}
    
    /// warning | Advertencia
    
    Fíjate que `Field` se importa directamente desde `pydantic`, no desde `fastapi` como el resto (`Query`, `Path`, `Body`, etc).
    
    ///
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:33:45 UTC 2025
    - 2.6K bytes
    - Viewed (0)
  7. docs/en/docs/tutorial/body-fields.md

    First, you have to import it:
    
    {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[4] *}
    
    
    /// warning
    
    Notice that `Field` is imported directly from `pydantic`, not from `fastapi` as are all the rest (`Query`, `Path`, `Body`, etc).
    
    ///
    
    ## Declare model attributes { #declare-model-attributes }
    
    You can then use `Field` with model attributes:
    
    {* ../../docs_src/body_fields/tutorial001_an_py310.py hl[11:14] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_body_fields/test_tutorial001.py

            "tutorial001_an_py39",
            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}})
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.3K bytes
    - Viewed (0)
  9. fastapi/openapi/utils.py

    def get_openapi_operation_request_body(
        *,
        body_field: Optional[ModelField],
        model_name_map: ModelNameMap,
        field_mapping: dict[
            tuple[ModelField, Literal["validation", "serialization"]], dict[str, Any]
        ],
        separate_input_output_schemas: bool = True,
    ) -> Optional[dict[str, Any]]:
        if not body_field:
            return None
        assert isinstance(body_field, ModelField)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 23.2K bytes
    - Viewed (0)
  10. fastapi/routing.py

    ) -> Callable[[Request], Coroutine[Any, Any, Response]]:
        assert dependant.call is not None, "dependant.call must be a function"
        is_coroutine = dependant.is_coroutine_callable
        is_body_form = body_field and isinstance(body_field.field_info, params.Form)
        if isinstance(response_class, DefaultPlaceholder):
            actual_response_class: type[Response] = response_class.value
        else:
            actual_response_class = response_class
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 174.6K bytes
    - Viewed (0)
Back to top