- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 146 for note (0.03 sec)
-
docs/en/docs/tutorial/response-status-code.md
* **`300 - 399`** are for "Redirection". Responses with these status codes may or may not have a body, except for `304`, "Not Modified", which must not have one. * **`400 - 499`** are for "Client error" responses. These are the second type you would probably use the most. * An example is `404`, for a "Not Found" response.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 4K bytes - Viewed (0) -
docs/en/docs/tutorial/request-files.md
```Python contents = myfile.file.read() ``` /// note | `async` Technical Details When you use the `async` methods, **FastAPI** runs the file methods in a threadpool and awaits for them. /// /// note | Starlette Technical Details
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 7.3K bytes - Viewed (0) -
docs/en/docs/tutorial/request-form-models.md
</div> ## Forbid Extra Form Fields { #forbid-extra-form-fields } In some special use cases (probably not very common), you might want to **restrict** the form fields to only those declared in the Pydantic model. And **forbid** any **extra** fields. /// note This is supported since FastAPI version `0.114.0`. 🤓 /// You can use Pydantic's model configuration to `forbid` any `extra` fields:
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/using-request-directly.md
By declaring a *path operation function* parameter with the type being the `Request` **FastAPI** will know to pass the `Request` in that parameter. /// tip Note that in this case, we are declaring a path parameter beside the request parameter. So, the path parameter will be extracted, validated, converted to the specified type and annotated with OpenAPI.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 2.4K bytes - Viewed (0) -
docs/en/docs/tutorial/query-params-str-validations.md
The query parameter `q` is of type `str | None`, that means that it's of type `str` but could also be `None`, and indeed, the default value is `None`, so FastAPI will know it's not required. /// note FastAPI will know that the value of `q` is not required because of the default value `= None`. Having `str | None` will allow your editor to give you better support and detect errors. ///
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 17.2K bytes - Viewed (0) -
docs/en/docs/tutorial/body-multiple-params.md
As, by default, singular values are interpreted as query parameters, you don't have to explicitly add a `Query`, you can just do: ```Python q: Union[str, None] = None ``` Or in Python 3.10 and above: ```Python q: str | None = None ``` For example: {* ../../docs_src/body_multiple_params/tutorial004_an_py310.py hl[28] *} /// info
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 4.9K bytes - Viewed (0) -
docs/en/docs/tutorial/middleware.md
* It then takes the **response** generated by the application (by some *path operation*). * It can do something to that **response** or run any needed code. * Then it returns the **response**. /// note | Technical Details If you have dependencies with `yield`, the exit code will run *after* the middleware.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 4.1K bytes - Viewed (0) -
docs/en/docs/advanced/templates.md
{* ../../docs_src/templates/tutorial001.py hl[4,11,15:18] *} /// note Before FastAPI 0.108.0, Starlette 0.29.0, the `name` was the first parameter. Also, before that, in previous versions, the `request` object was passed as part of the key-value pairs in the context for Jinja2. ///
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 3.5K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/dependencies-with-yield.md
participant handler as Exception handler participant dep as Dep with yield participant operation as Path Operation participant tasks as Background tasks Note over client,operation: Can raise exceptions, including HTTPException client ->> dep: Start request Note over dep: Run code up to yield opt raise Exception dep -->> handler: Raise Exception handler -->> client: HTTP error response end
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 12.7K bytes - Viewed (0) -
docs/en/docs/tutorial/path-params-numeric-validations.md
/// note A path parameter is always required as it has to be part of the path. Even if you declared it with `None` or set a default value, it would not affect anything, it would still be always required. /// ## Order the parameters as you need { #order-the-parameters-as-you-need } /// tip This is probably not as important or necessary if you use `Annotated`. ///
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 6.2K bytes - Viewed (0)