- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 209 for annotated (0.04 seconds)
-
fastapi/security/http.py
dependency. Read more about it in the [FastAPI docs for HTTP Basic Auth](https://fastapi.tiangolo.com/advanced/security/http-basic-auth/). """ username: Annotated[str, Doc("The HTTP Basic username.")] password: Annotated[str, Doc("The HTTP Basic password.")] class HTTPAuthorizationCredentials(BaseModel): """ The HTTP authorization credentials in the result of using `HTTPBearer` orCreated: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 13.2K bytes - Click Count (0) -
tests/test_ambiguous_params.py
@app.get("/multi-query") async def get(foo: Annotated[int, Query(gt=2), Query(lt=10)]): return foo with pytest.raises( AssertionError, match=( "Cannot specify `Depends` in `Annotated` and default value" " together for 'foo'" ), ): @app.get("/") async def get2(foo: Annotated[int, Depends(dep)] = Depends(dep)):Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 2K bytes - Click Count (1) -
docs/en/docs/tutorial/dependencies/classes-as-dependencies.md
Notice how we write `CommonQueryParams` twice in the above code: //// tab | Python 3.9+ ```Python commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)] ``` //// //// tab | Python 3.9+ non-Annotated /// tip Prefer to use the `Annotated` version if possible. /// ```Python commons: CommonQueryParams = Depends(CommonQueryParams) ``` ////
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 6.7K bytes - Click Count (0) -
docs/pt/docs/tutorial/dependencies/classes-as-dependencies.md
Perceba como escrevemos `CommonQueryParams` duas vezes no código abaixo: //// tab | Python 3.9+ ```Python commons: Annotated[CommonQueryParams, Depends(CommonQueryParams)] ``` //// //// tab | Python 3.9+ non-Annotated /// tip | Dica Utilize a versão com `Annotated` se possível. /// ```Python commons: CommonQueryParams = Depends(CommonQueryParams) ``` ////
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 7.3K bytes - Click Count (0) -
docs/uk/docs/tutorial/query-params-str-validations.md
### Імпорт `Query` та `Annotated` Щоб це зробити, спочатку імпортуємо: * `Query` з `fastapi` * `Annotated` з `typing` {* ../../docs_src/query_params_str_validations/tutorial002_an_py310.py hl[1,3] *} /// info | Інформація FastAPI додав підтримку `Annotated` (і почав рекомендувати його) у версії 0.95.0. Якщо у Вас старіша версія, під час використання `Annotated` можуть виникати помилки.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri May 30 14:17:24 GMT 2025 - 26.1K bytes - Click Count (0) -
tests/test_union_body_discriminator_annotated.py
return v.get("pet_type", "") Pet = Annotated[ Union[Annotated[Cat, Tag("cat")], Annotated[Dog, Tag("dog")]], Discriminator(get_pet_type), ] app = FastAPI() @app.post("/pet/assignment") async def create_pet_assignment(pet: Pet = Body()): return pet @app.post("/pet/annotated") async def create_pet_annotated(pet: Annotated[Pet, Body()]): return pet
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 7.7K bytes - Click Count (0) -
docs/pt/docs/tutorial/path-params-numeric-validations.md
## Importe `Path` { #import-path } Primeiro, importe `Path` de `fastapi`, e importe `Annotated`: {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[1,3] *} /// info | Informação O FastAPI adicionou suporte a `Annotated` (e passou a recomendá-lo) na versão 0.95.0. Se você tiver uma versão mais antiga, verá erros ao tentar usar `Annotated`.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 6.7K bytes - Click Count (0) -
fastapi/param_functions.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 12:54:56 GMT 2025 - 63K bytes - Click Count (0) -
tests/test_request_params/test_form/test_optional_list.py
): return {"p": p} class FormModelOptionalListStr(BaseModel): p: Optional[list[str]] = None @app.post("/model-optional-list-str", operation_id="model_optional_list_str") async def read_model_optional_list_str(p: Annotated[FormModelOptionalListStr, Form()]): return {"p": p.p} @pytest.mark.parametrize( "path",Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 9.9K bytes - Click Count (0) -
build-logic/binary-compatibility/src/test/groovy/gradlebuild/binarycompatibility/PublicAPIRulesTest.groovy
where: ruleElem << [new BinaryBreakingChangesRule([:]), new SinceAnnotationRule([:]), new IncubatingMissingRule([:])] error << ['Is not binary compatible.', 'Is not annotated with @since', 'Is not annotated with @Incubating'] } def "the @since annotation on inner classes is recognised"() { given: def rule = withContext(new SinceAnnotationRule([:]))Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Fri Jun 06 17:52:09 GMT 2025 - 16K bytes - Click Count (0)