Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for type (0.15 sec)

  1. docs/en/docs/tutorial/query-params-str-validations.md

    ## Use `Annotated` in the type for the `q` parameter
    
    Remember I told you before that `Annotated` can be used to add metadata to your parameters in the [Python Types Intro](../python-types.md#type-hints-with-metadata-annotations){.internal-link target=_blank}?
    
    Now it's the time to use it with FastAPI. 🚀
    
    We had this type annotation:
    
    === "Python 3.10+"
    
        ```Python
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 25.7K bytes
    - Viewed (0)
  2. docs/fr/docs/tutorial/query-params-str-validations.md

    Commençons avec cette application pour exemple :
    
    ```Python hl_lines="9"
    {!../../../docs_src/query_params_str_validations/tutorial001.py!}
    ```
    
    Le paramètre de requête `q` a pour type `Union[str, None]` (ou `str | None` en Python 3.10), signifiant qu'il est de type `str` mais pourrait aussi être égal à `None`, et bien sûr, la valeur par défaut est `None`, donc **FastAPI** saura qu'il n'est pas requis.
    
    !!! note
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Jul 27 18:53:21 GMT 2023
    - 9.8K bytes
    - Viewed (0)
  3. docs/ru/docs/tutorial/query-params-str-validations.md

    ## `Annotated` как тип для query-параметра `q`
    
    Помните, как ранее я говорил об Annotated? Он может быть использован для добавления метаданных для ваших параметров в разделе [Введение в аннотации типов Python](../python-types.md#type-hints-with-metadata-annotations){.internal-link target=_blank}?
    
    Пришло время использовать их в FastAPI. 🚀
    
    У нас была аннотация следующего типа:
    
    === "Python 3.10+"
    
        ```Python
        q: str | None = None
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 38K bytes
    - Viewed (0)
Back to top