- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 231 for Annotated (0.05 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 Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Mar 16 10:16:48 GMT 2026 - 13.1K bytes - Click Count (0) -
docs/ko/docs/tutorial/query-params-str-validations.md
### `Query`와 `Annotated` 임포트 { #import-query-and-annotated } 이를 위해 먼저 다음을 임포트합니다: * `fastapi`에서 `Query` * `typing`에서 `Annotated` {* ../../docs_src/query_params_str_validations/tutorial002_an_py310.py hl[1,3] *} /// info | 정보 FastAPI는 0.95.0 버전에서 `Annotated` 지원을 추가했고(그리고 이를 권장하기 시작했습니다). 이전 버전을 사용하면 `Annotated`를 사용하려고 할 때 오류가 발생합니다.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 18.7K bytes - Click Count (0) -
tests/test_request_params/test_form/test_optional_list.py
async def read_optional_list_alias( p: Annotated[list[str] | None, Form(alias="p_alias")] = None, ): return {"p": p} class FormModelOptionalListAlias(BaseModel): p: list[str] | None = Field(None, alias="p_alias") @app.post("/model-optional-list-alias", operation_id="model_optional_list_alias") async def read_model_optional_list_alias( p: Annotated[FormModelOptionalListAlias, Form()], ):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 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 Apr 01 11:36:16 GMT 2026 - Last Modified: Fri Jun 06 17:52:09 GMT 2025 - 16K bytes - Click Count (0) -
tests/benchmarks/test_general_performance.py
def sync_validated(item: ItemIn, dep: Annotated[int, Depends(dep_b)]): return ItemOut(name=item.name, value=item.value, dep=dep) @app.get("/sync/dict-no-response-model") def sync_dict_no_response_model(): return {"name": "foo", "value": 123} @app.get("/sync/dict-with-response-model", response_model=ItemOut) def sync_dict_with_response_model( dep: Annotated[int, Depends(dep_b)], ):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Dec 26 20:40:26 GMT 2025 - 11.1K bytes - Click Count (0) -
docs/ja/docs/tutorial/query-params-str-validations.md
### `Query` と `Annotated` のインポート { #import-query-and-annotated } そのために、まずは以下をインポートします: * `fastapi` から `Query` * `typing` から `Annotated` {* ../../docs_src/query_params_str_validations/tutorial002_an_py310.py hl[1,3] *} /// info | 情報 FastAPI はバージョン 0.95.0 で `Annotated` のサポートを追加し(推奨し始め)ました。 古いバージョンの場合、`Annotated` を使おうとするとエラーになります。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 20.3K bytes - Click Count (0) -
tests/test_request_params/test_header/test_required_str.py
# Alias @app.get("/required-alias") async def read_required_alias(p: Annotated[str, Header(alias="p_alias")]): return {"p": p} class HeaderModelRequiredAlias(BaseModel): p: str = Field(alias="p_alias") @app.get("/model-required-alias") async def read_model_required_alias(p: Annotated[HeaderModelRequiredAlias, Header()]): return {"p": p.p} @pytest.mark.parametrize(
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 10.3K bytes - Click Count (0) -
fastapi/security/oauth2.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Mar 24 16:32:10 GMT 2026 - 23.6K bytes - Click Count (0) -
tests/test_annotated.py
from typing import Annotated import pytest from fastapi import APIRouter, FastAPI, Query from fastapi.testclient import TestClient from inline_snapshot import snapshot app = FastAPI() @app.get("/default") async def default(foo: Annotated[str, Query()] = "foo"): return {"foo": foo} @app.get("/required") async def required(foo: Annotated[str, Query(min_length=1)]): return {"foo": foo} @app.get("/multiple")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 10.5K bytes - Click Count (0) -
tests/test_request_params/test_file/test_optional_list.py
from typing import Annotated import pytest from fastapi import FastAPI, File, UploadFile from fastapi.testclient import TestClient from .utils import get_body_model_name app = FastAPI() # ===================================================================================== # Without aliases @app.post("/optional-list-bytes") async def read_optional_list_bytes(p: Annotated[list[bytes] | None, File()] = None):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 21 13:01:31 GMT 2026 - 10.8K bytes - Click Count (0)