- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 344 for declare (0.05 sec)
-
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`. ///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/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) -
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:Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 9.6K bytes - Viewed (0) -
docs/en/docs/advanced/custom-response.md
But if you return a `Response` directly (or any subclass, like `JSONResponse`), the data won't be automatically converted (even if you declare a `response_model`), and the documentation won't be automatically generated (for example, including the specific "media type", in the HTTP header `Content-Type` as part of the generated OpenAPI).
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 12.2K bytes - Viewed (0) -
docs/en/docs/tutorial/sql-databases.md
Because each SQLModel model is also a Pydantic model, you can use it in the same **type annotations** that you could use Pydantic models. For example, if you declare a parameter of type `Hero`, it will be read from the **JSON body**. The same way, you can declare it as the function's **return type**, and then the shape of the data will show up in the automatic API docs UI.
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 15.4K bytes - Viewed (0) -
docs/en/docs/advanced/events.md
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 7.9K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
## Dependencies errors and return values { #dependencies-errors-and-return-values } You can use the same dependency *functions* you use normally. ### Dependency requirements { #dependency-requirements } They can declare request requirements (like headers) or other sub-dependencies: {* ../../docs_src/dependencies/tutorial006_an_py39.py hl[8,13] *} ### Raise exceptions { #raise-exceptions }Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 2.9K bytes - Viewed (0) -
docs/en/docs/alternatives.md
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Sun Aug 31 09:15:41 UTC 2025 - 23.6K bytes - Viewed (0) -
android/guava/src/com/google/common/io/Closer.java
* * @return this method does not return; it always throws * @throws IOException when the given throwable is an IOException * @throws X1 when the given throwable is of the declared type X1 * @throws X2 when the given throwable is of the declared type X2 */ public <X1 extends Exception, X2 extends Exception> RuntimeException rethrow( Throwable e, Class<X1> declaredType1, Class<X2> declaredType2) throws IOException, X1, X2 {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Mon Mar 17 20:26:29 UTC 2025 - 10.3K bytes - Viewed (0) -
docs/en/docs/reference/response.md
# `Response` class You can declare a parameter in a *path operation function* or dependency to be of type `Response` and then you can set data for the response like headers or cookies. You can also use it directly to create an instance of it and return it from your *path operations*. You can import it directly from `fastapi`: ```python from fastapi import Response ```
Registered: Sun Sep 07 07:19:17 UTC 2025 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 397 bytes - Viewed (0)