- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 660 for That (0.15 sec)
-
docs/en/docs/advanced/advanced-dependencies.md
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. ## A "callable" instance In Python there's a way to make an instance of a class a "callable". Not the class itself (which is already a callable), but an instance of that class. To do that, we declare a method `__call__`:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 16:10:15 UTC 2024 - 2.4K bytes - Viewed (0) -
docs/en/docs/advanced/openapi-webhooks.md
# OpenAPI Webhooks There are cases where you want to tell your API **users** that your app could call *their* app (sending a request) with some data, normally to **notify** of some type of **event**. This means that instead of the normal process of your users sending requests to your API, it's **your API** (or your app) that could **send requests to their system** (to their API, their app). This is normally called a **webhook**. ## Webhooks steps
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 10:38:23 UTC 2024 - 2.8K bytes - Viewed (0) -
docs/en/docs/tutorial/first-steps.md
The `@app.get("/")` tells **FastAPI** that the function right below is in charge of handling requests that go to: * the path `/` * using a <abbr title="an HTTP GET method"><code>get</code> operation</abbr> /// info | "`@decorator` Info" That `@something` syntax in Python is called a "decorator". You put it on top of a function. Like a pretty decorative hat (I guess that's where the term came from).
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 26 11:48:16 UTC 2024 - 11.8K bytes - Viewed (0) -
docs/en/docs/advanced/additional-responses.md
The correct place is: * In the key `content`, that has as value another JSON object (`dict`) that contains: * A key with the media type, e.g. `application/json`, that contains as value another JSON object, that contains: * A key `schema`, that has as the value the JSON Schema from the model, here's the correct place.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 16:07:07 UTC 2024 - 8.7K bytes - Viewed (0) -
docs/en/docs/advanced/security/oauth2-scopes.md
We also verify that we have a user with that username, and if not, we raise that same exception we created before. {* ../../docs_src/security/tutorial005_an_py310.py hl[47,117:128] *} ## Verify the `scopes` We now verify that all the scopes required, by this dependency and all the dependants (including *path operations*), are included in the scopes provided in the token received, otherwise raise an `HTTPException`.
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/python-types.md
The important thing to remember is that **the first *type parameter*** you pass to `Annotated` is the **actual type**. The rest, is just metadata for other tools. For now, you just need to know that `Annotated` exists, and that it's standard Python. 😎 Later you will see how **powerful** it can be. /// tip
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 26 11:47:53 UTC 2024 - 16.7K bytes - Viewed (0) -
docs/en/docs/advanced/additional-status-codes.md
It will use the default status code or the one you set in your *path operation*. ## Additional status codes If you want to return additional status codes apart from the main one, you can do that by returning a `Response` directly, like a `JSONResponse`, and set the additional status code directly.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 16:12:23 UTC 2024 - 1.9K bytes - Viewed (0) -
docs/en/docs/advanced/security/http-basic-auth.md
`secrets.compare_digest()` needs to take `bytes` or a `str` that only contains ASCII characters (the ones in English), this means it wouldn't work with characters like `á`, as in `Sebastián`. To handle that, we first convert the `username` and `password` to `bytes` encoding them with UTF-8. Then we can use `secrets.compare_digest()` to ensure that `credentials.username` is `"stanleyjobson"`, and that `credentials.password` is `"swordfish"`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Oct 26 16:01:27 UTC 2024 - 4.8K bytes - Viewed (0) -
docs/en/docs/advanced/events.md
This can be very useful for setting up **resources** that you need to use for the whole app, and that are **shared** among requests, and/or that you need to **clean up** afterwards. For example, a database connection pool, or loading a shared machine learning model. ## Use Case Let's start with an example **use case** and then see how to solve it with this. Let's imagine that you have some **machine learning models** that you want to use to handle requests. 🤖
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 10:36:22 UTC 2024 - 7.6K bytes - Viewed (0) -
compat/maven-compat/src/main/java/org/apache/maven/ProjectDependenciesResolver.java
* @param scopesToCollect The dependency scopes that should be collected, may be {@code null}. * @param scopesToResolve The dependency scopes that should be collected and also resolved, may be {@code null}. * @param session The current build session, must not be {@code null}. * @return The transitive dependencies of the specified project that match the requested scopes, never {@code null}.
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 5.4K bytes - Viewed (0)