- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 54 for useful (0.17 sec)
-
fastapi/security/http.py
is not available, instead of erroring out, the dependency result will be `None`. This is useful when you want to have optional authentication. It is also useful when you want to have authentication that can be provided in one of multiple optional ways (for example, in HTTP Basic
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Apr 19 15:29:38 GMT 2024 - 13.2K bytes - Viewed (0) -
fastapi/security/oauth2.py
is not available, instead of erroring out, the dependency result will be `None`. This is useful when you want to have optional authentication. It is also useful when you want to have authentication that can be provided in one of multiple optional ways (for example, with OAuth2 or in a cookie).
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Apr 02 02:48:51 GMT 2024 - 21.1K bytes - Viewed (1) -
docs/en/docs/how-to/index.md
Most of these ideas would be more or less **independent**, and in most cases you should only need to study them if they apply directly to **your project**. If something seems interesting and useful to your project, go ahead and check it, but otherwise, you might probably just skip them. !!! tip
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Aug 19 19:54:04 GMT 2023 - 591 bytes - Viewed (0) -
tests/test_compat.py
# TODO: there might not be a current valid code path that uses this, it would # potentially enable query parameters defined as both a scalar and a list # but that would require more refactors, also not sure it's really useful from fastapi._compat import is_pv1_scalar_field field_info = FieldInfo() field = ModelField( name="foo", field_info=field_info, type_=Union[str, List[int]],
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Sep 28 04:14:40 GMT 2023 - 2.8K bytes - Viewed (0) -
fastapi/param_functions.py
Optional[str], Doc( """ An alternative name for the parameter field. This will be used to extract the data and for the generated OpenAPI. It is particularly useful when you can't use the name you want because it is a Python reserved keyword or similar. """ ), ] = None, alias_priority: Annotated[ Union[int, None], Doc(
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:40:57 GMT 2024 - 62.5K bytes - Viewed (0) -
docs/en/docs/tutorial/security/get-current-user.md
!!! tip Prefer to use the `Annotated` version if possible. ```Python hl_lines="10" {!> ../../../docs_src/security/tutorial001.py!} ``` But that is still not that useful. Let's make it give us the current user. ## Create a user model First, let's create a Pydantic user model. The same way we use Pydantic to declare bodies, we can use it anywhere else:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jan 11 16:31:18 GMT 2024 - 7.6K bytes - Viewed (0) -
docs/en/docs/deployment/manually.md
It is equivalent to: ```Python from main import app ``` !!! warning Uvicorn and others support a `--reload` option that is useful during development. The `--reload` option consumes much more resources, is more unstable, etc. It helps a lot during **development**, but you **shouldn't** use it in **production**. ## Hypercorn with Trio
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 9.2K bytes - Viewed (0) -
docs/en/docs/advanced/using-request-directly.md
Although any other parameter declared normally (for example, the body with a Pydantic model) would still be validated, converted, annotated, etc. But there are specific cases where it's useful to get the `Request` object. ## Use the `Request` object directly Let's imagine you want to get the client's IP address/host inside of your *path operation function*. For that you need to access the request directly.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Aug 29 14:02:58 GMT 2020 - 2.3K bytes - Viewed (0) -
docs/en/docs/alternatives.md
Another big feature needed by APIs is data validation, making sure that the data is valid, given certain parameters. For example, that some field is an `int`, and not some random string. This is especially useful for incoming data. Without a data validation system, you would have to do all the checks by hand, in code. These features are what Marshmallow was built to provide. It is a great library, and I have used it a lot before.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 23.2K bytes - Viewed (0) -
docs/en/docs/deployment/concepts.md
--- Then the next concepts to consider are all about the program running your actual API (e.g. Uvicorn). ## Program and Process We will talk a lot about the running "**process**", so it's useful to have clarity about what it means, and what's the difference with the word "**program**". ### What is a Program The word **program** is commonly used to describe many things:
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 18K bytes - Viewed (0)