Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 31 - 40 of 478 for declare (0.04 seconds)

  1. docs/en/docs/tutorial/request-forms-and-files.md

    The files and form fields will be uploaded as form data and you will receive the files and form fields.
    
    And you can declare some of the files as `bytes` and some as `UploadFile`.
    
    /// warning
    
    You can declare multiple `File` and `Form` parameters in a *path operation*, but you can't also declare `Body` fields that you expect to receive as JSON, as the request will have the body encoded using `multipart/form-data` instead of `application/json`.
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sun Aug 31 09:15:41 GMT 2025
    - 1.5K bytes
    - Click Count (0)
  2. docs/en/docs/python-types.md

    {* ../../docs_src/python_types/tutorial004_py39.py hl[2] *}
    
    ## Declaring types { #declaring-types }
    
    You just saw the main place to declare type hints. As function parameters.
    
    This is also the main place you would use them with **FastAPI**.
    
    ### Simple types { #simple-types }
    
    You can declare all the standard Python types, not only `str`.
    
    You can use, for example:
    
    * `int`
    * `float`
    * `bool`
    * `bytes`
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 15.6K bytes
    - Click Count (0)
  3. docs/en/docs/tutorial/dependencies/index.md

    ///
    
    ### Import `Depends` { #import-depends }
    
    {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[3] *}
    
    ### Declare the dependency, in the "dependant" { #declare-the-dependency-in-the-dependant }
    
    The same way you use `Body`, `Query`, etc. with your *path operation function* parameters, use `Depends` with a new parameter:
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sun Aug 31 09:15:41 GMT 2025
    - 9.6K bytes
    - Click Count (0)
  4. docs/fr/docs/tutorial/query-params-str-validations.md

    Disons que vous déclarez le paramètre `q` comme ayant une longueur minimale de `3`, et une valeur par défaut étant `"fixedquery"` :
    
    {* ../../docs_src/query_params_str_validations/tutorial005.py hl[7] *}
    
    /// note | Rappel
    
    Avoir une valeur par défaut rend le paramètre optionnel.
    
    ///
    
    ## Rendre ce paramètre requis
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Nov 09 16:39:20 GMT 2024
    - 9.5K bytes
    - Click Count (0)
  5. docs/pt/docs/tutorial/body.md

    ```JSON
    {
        "name": "Foo",
        "price": 45.2
    }
    ```
    
    ## Declare como um parâmetro { #declare-it-as-a-parameter }
    
    Para adicioná-lo à sua *operação de rota*, declare-o da mesma maneira que você declarou parâmetros de rota e de consulta:
    
    {* ../../docs_src/body/tutorial001_py310.py hl[16] *}
    
    ...e declare o seu tipo como o modelo que você criou, `Item`.
    
    ## Resultados { #results }
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 7.9K bytes
    - Click Count (0)
  6. docs/pt/docs/tutorial/cookie-param-models.md

    ///
    
    ## Cookies com Modelos Pydantic { #cookies-with-a-pydantic-model }
    
    Declare o parâmetro de **cookie** que você precisa em um **modelo Pydantic**, e depois declare o parâmetro como um `Cookie`:
    
    {* ../../docs_src/cookie_param_models/tutorial001_an_py310.py hl[9:12,16] *}
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Tue Dec 16 20:32:40 GMT 2025
    - 3.4K bytes
    - Click Count (0)
  7. docs/en/docs/advanced/path-operation-advanced-configuration.md

    ## Additional Responses { #additional-responses }
    
    You probably have seen how to declare the `response_model` and `status_code` for a *path operation*.
    
    That defines the metadata about the main response of a *path operation*.
    
    You can also declare additional responses with their models, status codes, etc.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 7.2K bytes
    - Click Count (0)
  8. docs/en/docs/advanced/response-headers.md

    You can declare a parameter of type `Response` in your *path operation function* (as you can do for cookies).
    
    And then you can set headers in that *temporal* response object.
    
    {* ../../docs_src/response_headers/tutorial002_py39.py hl[1, 7:8] *}
    
    And then you can return any object you need, as you normally would (a `dict`, a database model, etc).
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 2.3K bytes
    - Click Count (0)
  9. docs/pt/docs/tutorial/body-fields.md

    ///
    
    ## 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] *}
    
    `Field` funciona da mesma forma que `Query`, `Path` e `Body`, ele possui todos os mesmos parâmetros, etc.
    
    /// note | Detalhes Técnicos
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Nov 12 16:23:57 GMT 2025
    - 2.6K bytes
    - Click Count (0)
  10. docs/en/docs/tutorial/security/get-current-user.md

    {* ../../docs_src/security/tutorial002_an_py310.py hl[31] *}
    
    Notice that we declare the type of `current_user` as the Pydantic model `User`.
    
    This will help us inside of the function with all the completion and type checks.
    
    /// tip
    
    You might remember that request bodies are also declared with Pydantic models.
    
    Here **FastAPI** won't get confused because you are using `Depends`.
    
    ///
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sun Aug 31 09:15:41 GMT 2025
    - 4K bytes
    - Click Count (0)
Back to Top