- Sort Score
- Num 10 results
- Language All
Results 801 - 810 of 1,083 for str (0.01 seconds)
-
docs/fr/docs/tutorial/encoder.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 1.8K bytes - Click Count (0) -
docs/pt/docs/tutorial/encoder.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:20:43 GMT 2026 - 1.7K bytes - Click Count (0) -
tests/test_repeated_dependency_schema.py
from inline_snapshot import snapshot app = FastAPI() def get_header(*, someheader: str = Header()): return someheader def get_something_else(*, someheader: str = Depends(get_header)): return f"{someheader}123" @app.get("/") def get_deps(dep1: str = Depends(get_header), dep2: str = Depends(get_something_else)): return {"dep1": dep1, "dep2": dep2} client = TestClient(app)
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 4K bytes - Click Count (0) -
docs/de/docs/tutorial/dependencies/sub-dependencies.md
```Python hl_lines="1" async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]): return {"fresh_value": fresh_value} ``` //// //// tab | Python 3.10+ nicht annotiert /// tip | Tipp Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 07:57:30 GMT 2026 - 4.5K bytes - Click Count (0) -
docs_src/json_base64_bytes/tutorial001_py310.py
from pydantic import BaseModel class DataInput(BaseModel): description: str data: bytes model_config = {"val_json_bytes": "base64"} class DataOutput(BaseModel): description: str data: bytes model_config = {"ser_json_bytes": "base64"} class DataInputOutput(BaseModel): description: str data: bytes model_config = { "val_json_bytes": "base64",
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 21 13:01:31 GMT 2026 - 892 bytes - Click Count (0) -
docs/uk/docs/tutorial/security/get-current-user.md
{* ../../docs_src/security/tutorial002_an_py310.py hl[25] *} ## Отримати користувача { #get-the-user } `get_current_user` використає (фальшиву) утилітну функцію, яку ми створили, що приймає `token` як `str` і повертає нашу Pydantic-модель `User`:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:43:14 GMT 2026 - 6.7K bytes - Click Count (0) -
tests/test_response_class_no_mediatype.py
from pydantic import BaseModel app = FastAPI() class JsonApiResponse(JSONResponse): media_type = "application/vnd.api+json" class Error(BaseModel): status: str title: str class JsonApiError(BaseModel): errors: list[Error] @app.get( "/a", response_class=Response, responses={500: {"description": "Error", "model": JsonApiError}}, )
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 3.6K bytes - Click Count (0) -
tests/test_required_noneable.py
from fastapi.testclient import TestClient app = FastAPI() @app.get("/query") def read_query(q: str | None): return q @app.get("/explicit-query") def read_explicit_query(q: str | None = Query()): return q @app.post("/body-embed") def send_body_embed(b: str | None = Body(embed=True)): return b client = TestClient(app) def test_required_nonable_query_invalid():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 1.5K bytes - Click Count (0) -
tests/test_response_code_no_body.py
from pydantic import BaseModel app = FastAPI() class JsonApiResponse(JSONResponse): media_type = "application/vnd.api+json" class Error(BaseModel): status: str title: str class JsonApiError(BaseModel): errors: list[Error] @app.get( "/a", status_code=204, response_class=JsonApiResponse,
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 3.5K bytes - Click Count (0) -
docs/tr/docs/tutorial/dependencies/sub-dependencies.md
```Python hl_lines="1" async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]): return {"fresh_value": fresh_value} ``` //// //// tab | Python 3.10+ Annotated olmayan /// tip | İpucu Mümkünse `Annotated` sürümünü tercih edin. /// ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)): return {"fresh_value": fresh_value}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 12:41:38 GMT 2026 - 4.2K bytes - Click Count (0)