- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 1,341 for that (0.04 sec)
-
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/async.md
### Is concurrency better than parallelism? Nope! That's not the moral of the story. Concurrency is different than parallelism. And it is better on **specific** scenarios that involve a lot of waiting. Because of that, it generally is a lot better than parallelism for web application development. But not for everything. So, to balance that out, imagine the following short story:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Aug 28 23:33:37 UTC 2024 - 23.5K bytes - Viewed (0) -
docs/en/docs/alternatives.md
Routes are declared in a single place, using functions declared in other places (instead of using decorators that can be placed right on top of the function that handles the endpoint). This is closer to how Django does it than to how Flask (and Starlette) does it. It separates in the code things that are relatively tightly coupled.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 20 19:20:23 UTC 2024 - 23.2K bytes - Viewed (0) -
docs/en/docs/advanced/testing-dependencies.md
You probably want to test the external provider once, but not necessarily call it for every test that runs. In this case, you can override the dependency that calls that provider, and use a custom dependency that returns a mock user, only for your tests. ### Use the `app.dependency_overrides` attribute
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.9K 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/tutorial/sql-databases.md
* `Field(index=True)` tells SQLModel that it should create a **SQL index** for this column, that would allow faster lookups in the database when reading data filtered by this column. SQLModel will know that something declared as `str` will be a SQL column of type `TEXT` (or `VARCHAR`, depending on the database).
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/virtual-environments.md
//// /// tip Every time you install a **new package** in that environment, **activate** the environment again. This makes sure that if you use a **terminal (<abbr title="command line interface">CLI</abbr>) program** installed by that package, you use the one from your virtual environment and not any other that could be installed globally, probably with a different version than what you need. /// ## Check the Virtual Environment is Active
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Aug 24 03:16:23 UTC 2024 - 21.7K bytes - Viewed (0) -
docs/en/docs/advanced/behind-a-proxy.md
# Behind a Proxy In some situations, you might need to use a **proxy** server like Traefik or Nginx with a configuration that adds an extra path prefix that is not seen by your application. In these cases you can use `root_path` to configure your application. The `root_path` is a mechanism provided by the ASGI specification (that FastAPI is built on, through Starlette). The `root_path` is used to handle these specific cases.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 16:49:49 UTC 2024 - 11.6K bytes - Viewed (0) -
docs/en/docs/advanced/openapi-callbacks.md
You could create an API with a *path operation* that could trigger a request to an *external API* created by someone else (probably the same developer that would be *using* your API). The process that happens when your API app calls the *external API* is named a "callback". Because the software that the external developer wrote sends a request to your API and then your API *calls back*, sending a request to an *external API* (that was probably created by the same developer).
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.7K bytes - Viewed (0) -
docs/en/docs/advanced/custom-response.md
/// tip Notice that here as we are using standard `open()` that doesn't support `async` and `await`, we declare the path operation with normal `def`. /// ### `FileResponse` Asynchronously streams a file as the response. Takes a different set of arguments to instantiate than the other response types:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 12K bytes - Viewed (0)