- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 329 for declare (0.04 sec)
-
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.py hl[1, 7:8] *} And then you can return any object you need, as you normally would (a `dict`, a database model, etc).
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 2.3K 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.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 8.9K bytes - Viewed (0) -
docs/pt/docs/tutorial/body.md
```JSON { "name": "Foo", "price": 45.2 } ``` ## Declare como um parâmetro Para adicionar o corpo na *função de operação de rota*, declare-o da mesma maneira que você declarou parâmetros de rota e consulta: {* ../../docs_src/body/tutorial001.py hl[18] *} ...E declare o tipo como o modelo que você criou, `Item`. ## Resultados
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 7K bytes - Viewed (0) -
docs/en/docs/advanced/advanced-dependencies.md
## Parameterized dependencies { #parameterized-dependencies } All the dependencies we have seen are a fixed function or class. But there could be cases where you want to be able to set parameters on the dependency, without having to declare many different functions or classes. Let's imagine that we want to have a dependency that checks if the query parameter `q` contains some fixed content. But we want to be able to parameterize that fixed content.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 2.6K bytes - Viewed (0) -
docs/en/docs/advanced/response-cookies.md
You can declare a parameter of type `Response` in your *path operation function*. And then you can set cookies in that *temporal* response object. {* ../../docs_src/response_cookies/tutorial002.py hl[1, 8:9] *} And then you can return any object you need, as you normally would (a `dict`, a database model, etc).
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 2.2K bytes - Viewed (0) -
docs/en/docs/advanced/response-change-status-code.md
And if you declared a `response_model`, it will still be used to filter and convert the object you returned. **FastAPI** will use that *temporal* response to extract the status code (also cookies and headers), and will put them in the final response that contains the value you returned, filtered by any `response_model`.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 1.5K bytes - Viewed (0) -
docs/en/docs/tutorial/extra-models.md
We could do better. We can declare a `UserBase` model that serves as a base for our other models. And then we can make subclasses of that model that inherit its attributes (type declarations, validation, etc). All the data conversion, validation, documentation, etc. will still work as normally.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 7.2K bytes - Viewed (0) -
docs/pt/docs/tutorial/path-params-numeric-validations.md
Do mesmo modo que você pode declarar mais validações e metadados para parâmetros de consulta com `Query`, você pode declarar os mesmos tipos de validações e metadados para parâmetros de rota com `Path`. ## Importe `Path` Primeiro, importe `Path` de `fastapi`: {* ../../docs_src/path_params_numeric_validations/tutorial001_py310.py hl[1] *} ## Declare metadados Você pode declarar todos os parâmetros da mesma maneira que na `Query`.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 5.1K bytes - Viewed (0) -
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
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sat Nov 09 16:39:20 UTC 2024 - 9.5K bytes - Viewed (0) -
docs/en/docs/tutorial/schema-extra-example.md
# Declare Request Example Data { #declare-request-example-data } You can declare examples of the data your app can receive. Here are several ways to do it. ## Extra JSON Schema data in Pydantic models { #extra-json-schema-data-in-pydantic-models } You can declare `examples` for a Pydantic model that will be added to the generated JSON Schema. //// tab | Pydantic v2 {* ../../docs_src/schema_extra_example/tutorial001_py310.py hl[13:24] *}
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 9.6K bytes - Viewed (0)