- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 251 for declare (0.15 sec)
-
docs/en/docs/alternatives.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 23.2K bytes - Viewed (0) -
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`.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 2K bytes - Viewed (0) -
docs/pt/docs/tutorial/path-params-numeric-validations.md
Então, você deve declará-lo com `...` para marcá-lo como obrigatório. Mesmo que você declare-o como `None` ou defina um valor padrão, isso não teria efeito algum, o parâmetro ainda seria obrigatório. ## Ordene os parâmetros de acordo com sua necessidade Suponha que você queira declarar o parâmetro de consulta `q` como uma `str` obrigatória.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Oct 17 05:59:11 GMT 2023 - 5.6K bytes - Viewed (0) -
docs/en/docs/reference/background.md
# Background Tasks - `BackgroundTasks` You can declare a parameter in a *path operation function* or dependency function with the type `BackgroundTasks`, and then you can use it to schedule the execution of background tasks after the response is sent. You can import it directly from `fastapi`: ```python from fastapi import BackgroundTasks ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 377 bytes - Viewed (0) -
docs/en/docs/tutorial/body-nested-models.md
``` This will make `tags` be a list, although it doesn't declare the type of the elements of the list. ## List fields with type parameter But Python has a specific way to declare lists with internal types, or "type parameters": ### Import typing's `List` In Python 3.9 and above you can use the standard `list` to declare these type annotations as we'll see below. 💡
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) -
docs/en/docs/tutorial/schema-extra-example.md
# 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 You can declare `examples` for a Pydantic model that will be added to the generated JSON Schema. === "Python 3.10+ Pydantic v2" ```Python hl_lines="13-24" {!> ../../../docs_src/schema_extra_example/tutorial001_py310.py!} ```
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 11.8K bytes - Viewed (0) -
docs/en/docs/reference/request.md
# `Request` class You can declare a parameter in a *path operation function* or dependency to be of type `Request` and then you can access the raw request object directly, without any validation, etc. You can import it directly from `fastapi`: ```python from fastapi import Request ``` !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 516 bytes - Viewed (0) -
docs/en/docs/advanced/response-headers.md
## Use a `Response` parameter 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. ```Python hl_lines="1 7-8" {!../../../docs_src/response_headers/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) -
docs/en/docs/tutorial/query-params-str-validations.md
It is used by Pydantic and FastAPI to explicitly declare that a value is required. This will let **FastAPI** know that this parameter is required. ### Required with `None` You can declare that a parameter can accept `None`, but that it's still required. This would force clients to send a value, even if the value is `None`. To do that, you can declare that `None` is a valid type but still use `...` as the default:
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) -
docs/en/docs/tutorial/request-files.md
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Mar 13 19:02:19 GMT 2024 - 10.2K bytes - Viewed (0)