- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 498 for Annotated (0.04 sec)
-
docs_src/security/tutorial005_an_py39.py
return user async def get_current_active_user( current_user: Annotated[User, Security(get_current_user, scopes=["me"])], ): if current_user.disabled: raise HTTPException(status_code=400, detail="Inactive user") return current_user @app.post("/token") async def login_for_access_token( form_data: Annotated[OAuth2PasswordRequestForm, Depends()], ) -> Token:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Sep 29 02:57:38 UTC 2025 - 5.3K bytes - Viewed (0) -
docs/de/docs/tutorial/query-params-str-validations.md
### `Query` und `Annotated` importieren { #import-query-and-annotated } Um dies zu erreichen, importieren Sie zuerst: * `Query` von `fastapi` * `Annotated` von `typing` {* ../../docs_src/query_params_str_validations/tutorial002_an_py310.py hl[1,3] *} /// info | Info FastAPI hat Unterstützung für `Annotated` hinzugefügt (und begonnen, es zu empfehlen) in der Version 0.95.0.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 24 10:28:19 UTC 2025 - 19.1K bytes - Viewed (0) -
docs/pt/docs/tutorial/query-params-str-validations.md
Certifique-se de [Atualizar a versão do FastAPI](../deployment/versions.md#upgrading-the-fastapi-versions){.internal-link target=_blank} para pelo menos 0.95.1 antes de usar `Annotated`. /// ## Use `Annotated` no tipo do parâmetro `q` { #use-annotated-in-the-type-for-the-q-parameter }
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 18.2K bytes - Viewed (0) -
fastapi/security/api_key.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 9.6K bytes - Viewed (1) -
tests/test_request_params/test_path/test_required_str.py
from typing import Annotated import pytest from fastapi import FastAPI, Path from fastapi.testclient import TestClient app = FastAPI() @app.get("/required-str/{p}") async def read_required_str(p: Annotated[str, Path()]): return {"p": p} @app.get("/required-alias/{p_alias}") async def read_required_alias(p: Annotated[str, Path(alias="p_alias")]): return {"p": p}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 2.3K bytes - Viewed (0) -
fastapi/params.py
import warnings from collections.abc import Sequence from dataclasses import dataclass from enum import Enum from typing import Annotated, Any, Callable, Optional, Union from fastapi.exceptions import FastAPIDeprecationWarning from fastapi.openapi.models import Example from pydantic import AliasChoices, AliasPath from pydantic.fields import FieldInfo from typing_extensions import Literal, deprecated from ._compat import ( Undefined, )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 26.3K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial013_an_py39.py
from typing import Annotated from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items(q: Annotated[list, Query()] = []): query_items = {"q": q}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 210 bytes - Viewed (0) -
tests/test_request_params/test_form/test_required_str.py
return {"p": p} class FormModelRequiredStr(BaseModel): p: str @app.post("/model-required-str", operation_id="model_required_str") async def read_model_required_str(p: Annotated[FormModelRequiredStr, Form()]): return {"p": p.p} @pytest.mark.parametrize( "path", ["/required-str", "/model-required-str"], ) def test_required_str_schema(path: str):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 10.6K bytes - Viewed (0) -
tests/test_request_params/test_header/test_list.py
from typing import Annotated import pytest from dirty_equals import AnyThing, IsOneOf, IsPartialDict from fastapi import FastAPI, Header from fastapi.testclient import TestClient from pydantic import BaseModel, Field app = FastAPI() # ===================================================================================== # Without aliases @app.get("/required-list-str") async def read_required_list_str(p: Annotated[list[str], Header()]):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:31:34 UTC 2025 - 11K bytes - Viewed (0) -
docs_src/header_params/tutorial002_an_py310.py
from typing import Annotated from fastapi import FastAPI, Header app = FastAPI() @app.get("/items/") async def read_items( strange_header: Annotated[str | None, Header(convert_underscores=False)] = None, ):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Mar 26 16:56:53 UTC 2024 - 261 bytes - Viewed (0)