- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 261 for declared (0.28 sec)
-
docs/en/docs/tutorial/body.md
```JSON { "name": "Foo", "price": 45.2 } ``` ## Declare it as a parameter To add it to your *path operation*, declare it the same way you declared path and query parameters: {* ../../docs_src/body/tutorial001_py310.py hl[16] *} ...and declare its type as the model you created, `Item`. ## Results With just that Python type declaration, **FastAPI** will: * Read the body of the request as JSON.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 16:58:19 UTC 2024 - 6.6K bytes - Viewed (0) -
docs/en/docs/advanced/security/oauth2-scopes.md
It will always have the security scopes declared in the current `Security` dependencies and all the dependants for **that specific** *path operation* and **that specific** dependency tree. Because the `SecurityScopes` will have all the scopes declared by dependants, you can use it to verify that a token has the required scopes in a central dependency function, and then declare different scope requirements in different *path operations*.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 29 11:02:16 UTC 2024 - 13.1K bytes - Viewed (0) -
docs/en/docs/tutorial/dependencies/sub-dependencies.md
``` //// Let's focus on the parameters declared: * Even though this function is a dependency ("dependable") itself, it also declares another dependency (it "depends" on something else). * It depends on the `query_extractor`, and assigns the value returned by it to the parameter `q`. * It also declares an optional `last_query` cookie, as a `str`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.5K bytes - Viewed (0) -
docs/en/docs/tutorial/response-model.md
### `response_model` or Return Type In this case, because the two models are different, if we annotated the function return type as `UserOut`, the editor and tools would complain that we are returning an invalid type, as those are different classes. That's why in this example we have to declare it in the `response_model` parameter.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 18.1K bytes - Viewed (0) -
docs/en/docs/tutorial/path-params.md
```JSON {"item_id":"foo"} ``` ## Path parameters with types You can declare the type of a path parameter in the function, using standard Python type annotations: ```Python hl_lines="7" {!../../docs_src/path_params/tutorial002.py!} ``` In this case, `item_id` is declared to be an `int`. /// check This will give you editor support inside of your function, with error checks, completion, etc.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.1K 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 Nov 01 12:43:10 UTC 2024 - Last Modified: Tue May 07 15:26:58 UTC 2024 - 10.4K 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 09 19:44:42 UTC 2024 - 14.7K 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).
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.5K bytes - Viewed (0) -
android/guava-testlib/src/com/google/common/testing/ClassSanityTester.java
* <li>If there is any non-private constructor or non-private static factory method declared by * {@code cls}, all non-private instance methods will be checked too using the instance * created by invoking the constructor or static factory method. * <li>If there is any non-private constructor or non-private static factory method declared by * {@code cls}: * <ul>
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:18:12 UTC 2024 - 32.7K bytes - Viewed (0)