- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 250 for declare (0.15 sec)
-
docs/pt/docs/tutorial/header-params.md
{!> ../../../docs_src/header_params/tutorial001_py310.py!} ``` === "Python 3.8+" ```Python hl_lines="3" {!> ../../../docs_src/header_params/tutorial001.py!} ``` ## Declare parâmetros de `Header` Então declare os paramêtros de cabeçalho usando a mesma estrutura que em `Path`, `Query` e `Cookie`. O primeiro valor é o valor padrão, você pode passar todas as validações adicionais ou parâmetros de anotação:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 3.9K bytes - Viewed (0) -
docs/en/docs/advanced/security/oauth2-scopes.md
```Python hl_lines="155" {!> ../../../docs_src/security/tutorial005.py!} ``` ## Declare scopes in *path operations* and dependencies Now we declare that the *path operation* for `/users/me/items/` requires the scope `items`. For this, we import and use `Security` from `fastapi`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 21:21:35 GMT 2024 - 20.5K bytes - Viewed (0) -
docs/en/docs/tutorial/body-multiple-params.md
You can also declare singular values to be received as part of the body.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 7.7K bytes - Viewed (0) -
docs/en/docs/python-types.md
```Python hl_lines="2" {!../../../docs_src/python_types/tutorial004.py!} ``` ## 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 You can declare all the standard Python types, not only `str`. You can use, for example: * `int` * `float` * `bool` * `bytes`
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 17K bytes - Viewed (0) -
docs/en/docs/tutorial/cookie-params.md
!!! tip Prefer to use the `Annotated` version if possible. ```Python hl_lines="3" {!> ../../../docs_src/cookie_params/tutorial001.py!} ``` ## Declare `Cookie` parameters Then declare the cookie parameters using the same structure as with `Path` and `Query`. The first value is the default value, you can pass all the extra validation or annotation parameters: === "Python 3.10+"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 2.4K bytes - Viewed (0) -
docs/en/docs/tutorial/header-params.md
!!! tip Prefer to use the `Annotated` version if possible. ```Python hl_lines="3" {!> ../../../docs_src/header_params/tutorial001.py!} ``` ## Declare `Header` parameters Then declare the header parameters using the same structure as with `Path`, `Query` and `Cookie`. The first value is the default value, you can pass all the extra validation or annotation parameters: === "Python 3.10+"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 5.8K bytes - Viewed (0) -
fastapi/param_functions.py
] = True, ) -> Any: """ Declare a FastAPI Security dependency. The only difference with a regular dependency is that it can declare OAuth2 scopes that will be integrated with OpenAPI and the automatic UI docs (by default at `/docs`). It takes a single "dependable" callable (like a function). Don't call it directly, FastAPI will call it for you. Read more about it in the
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 62.5K bytes - Viewed (0) -
docs/en/docs/tutorial/query-params.md
## Multiple path and query parameters You can declare multiple path parameters and query parameters at the same time, **FastAPI** knows which is which. And you don't have to declare them in any specific order. They will be detected by name: === "Python 3.10+" ```Python hl_lines="6 8"
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Oct 20 09:08:42 GMT 2023 - 5.1K bytes - Viewed (0) -
docs/en/docs/advanced/additional-responses.md
You can declare a `response_model`, using the default status code `200` (or a custom one if you need), and then declare additional information for that same response in `responses`, directly in the OpenAPI schema. **FastAPI** will keep the additional information from `responses`, and combine it with the JSON Schema from your model.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 8.8K bytes - Viewed (0) -
docs/en/docs/advanced/response-cookies.md
## Use a `Response` parameter You can declare a parameter of type `Response` in your *path operation function*. And then you can set cookies in that *temporal* response object. ```Python hl_lines="1 8-9" {!../../../docs_src/response_cookies/tutorial002.py!} ``` And then you can return any object you need, as you normally would (a `dict`, a database model, etc).
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 2.2K bytes - Viewed (0)