Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 181 for Fields (0.27 sec)

  1. docs/en/docs/release-notes.md

    Using resources from dependencies with `yield` in background tasks is no longer supported.
    
    This change is what supports the new features, read below. 🤓
    
    ### Dependencies with `yield`, `HTTPException` and Background Tasks
    
    Dependencies with `yield` now can raise `HTTPException` and other exceptions after `yield`. 🎉
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 03 23:25:42 GMT 2024
    - 388.1K bytes
    - Viewed (1)
  2. fastapi/applications.py

                    It can contain several fields.
    
                    * `name`: (`str`) **REQUIRED** (if a `license_info` is set). The
                        license name used for the API.
                    * `identifier`: (`str`) An [SPDX](https://spdx.dev/) license expression
                        for the API. The `identifier` field is mutually exclusive of the `url`
                        field. Available since OpenAPI 3.1.0, FastAPI 0.99.0.
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  3. fastapi/routing.py

                    response_field = create_response_field(name=response_name, type_=model)
                    response_fields[additional_status_code] = response_field
            if response_fields:
                self.response_fields: Dict[Union[int, str], ModelField] = response_fields
            else:
                self.response_fields = {}
    
            assert callable(endpoint), "An endpoint must be a callable"
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/request-forms.md

        ```
    
    For example, in one of the ways the OAuth2 specification can be used (called "password flow") it is required to send a `username` and `password` as form fields.
    
    The <abbr title="specification">spec</abbr> requires the fields to be exactly named `username` and `password`, and to be sent as form fields, not JSON.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Wed Mar 13 19:02:19 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/query-params-str-validations.md

    ```
    
    !!! tip
        Pydantic 是 FastAPI 中所有数据验证和序列化的核心,当你在没有设默认值的情况下使用 `Optional` 或 `Union[Something, None]` 时,它具有特殊行为,你可以在 Pydantic 文档中阅读有关<a href="https://docs.pydantic.dev/latest/concepts/models/#required-optional-fields" class="external-link" target="_blank">必需可选字段</a>的更多信息。
    
    ### 使用Pydantic中的`Required`代替省略号(`...`)
    
    如果你觉得使用 `...` 不舒服,你也可以从 Pydantic 导入并使用 `Required`:
    
    ```Python hl_lines="2  8"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.2K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/query-params-str-validations.md

    !!! tip "Tipp"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 17:58:59 GMT 2024
    - 27.7K bytes
    - Viewed (0)
  7. fastapi/encoders.py

                Pydantic's `include` parameter, passed to Pydantic models to set the
                fields to include.
                """
            ),
        ] = None,
        exclude: Annotated[
            Optional[IncEx],
            Doc(
                """
                Pydantic's `exclude` parameter, passed to Pydantic models to set the
                fields to exclude.
                """
            ),
        ] = None,
        by_alias: Annotated[
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  8. docs/pt/docs/tutorial/schema-extra-example.md

        Por exemplo, você pode usar isso para adicionar metadados para uma interface de usuário de front-end, etc.
    
    ## `Field` de argumentos adicionais
    
    Ao usar `Field ()` com modelos Pydantic, você também pode declarar informações extras para o **JSON Schema** passando quaisquer outros argumentos arbitrários para a função.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  9. docs/en/docs/tutorial/body-nested-models.md

    # Body - Nested Models
    
    With **FastAPI**, you can define, validate, document, and use arbitrarily deeply nested models (thanks to Pydantic).
    
    ## List fields
    
    You can define an attribute to be a subtype. For example, a Python `list`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="12"
        {!> ../../../docs_src/body_nested_models/tutorial001_py310.py!}
        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="14"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.5K bytes
    - Viewed (0)
  10. docs/zh/docs/tutorial/schema-extra-example.md

        ```
    
    === "Python 3.8+"
    
        ```Python hl_lines="15-23"
        {!> ../../../docs_src/schema_extra_example/tutorial001.py!}
        ```
    
    这些额外的信息将按原样添加到输出的JSON模式中。
    
    ## `Field` 的附加参数
    
    在 `Field`, `Path`, `Query`, `Body` 和其他你之后将会看到的工厂函数,你可以为JSON 模式声明额外信息,你也可以通过给工厂函数传递其他的任意参数来给JSON 模式声明额外信息,比如增加 `example`:
    
    === "Python 3.10+"
    
        ```Python hl_lines="2  8-11"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 3.5K bytes
    - Viewed (0)
Back to top