- Sort Score
- Result 10 results
- Languages All
Results 731 - 740 of 1,080 for Str (0.01 sec)
-
docs_src/query_params_str_validations/tutorial008_an_py310.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 498 bytes - Viewed (0) -
docs_src/query_param_models/tutorial001_an.py
app = FastAPI() class FilterParams(BaseModel): limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: List[str] = [] @app.get("/items/") async def read_items(filter_query: Annotated[FilterParams, Query()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 478 bytes - Viewed (0) -
docs_src/query_param_models/tutorial002_pv1_an_py39.py
class Config: extra = "forbid" limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: list[str] = [] @app.get("/items/") async def read_items(filter_query: Annotated[FilterParams, Query()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 497 bytes - Viewed (0) -
docs_src/query_param_models/tutorial002_pv1_py39.py
class Config: extra = "forbid" limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: list[str] = [] @app.get("/items/") async def read_items(filter_query: FilterParams = Query()):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 476 bytes - Viewed (0) -
tests/test_custom_schema_fields.py
from fastapi import FastAPI from fastapi._compat import PYDANTIC_V2 from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str if PYDANTIC_V2: model_config = { "json_schema_extra": { "x-something-internal": {"level": 4}, } } else: class Config: schema_extra = {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.2K bytes - Viewed (0) -
docs_src/custom_docs_ui/tutorial001.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu May 23 22:59:02 UTC 2024 - 1.1K bytes - Viewed (0) -
docs_src/query_params_str_validations/tutorial010_py310.py
from fastapi import FastAPI, Query app = FastAPI() @app.get("/items/") async def read_items( q: str | None = Query( default=None, alias="item-query", title="Query string", description="Query string for the items to search in the database that have a good match", min_length=3, max_length=50, pattern="^fixedquery$", deprecated=True, ), ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 24 20:26:06 UTC 2023 - 542 bytes - Viewed (0) -
docs_src/path_params_numeric_validations/tutorial006_an.py
from typing_extensions import Annotated app = FastAPI() @app.get("/items/{item_id}") async def read_items( *, item_id: Annotated[int, Path(title="The ID of the item to get", ge=0, le=1000)], q: str, size: Annotated[float, Query(gt=0, lt=10.5)], ): results = {"item_id": item_id} if q: results.update({"q": q}) if size: results.update({"size": size})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Aug 28 23:39:15 UTC 2024 - 457 bytes - Viewed (0) -
docs_src/query_param_models/tutorial002_pv1_an.py
class Config: extra = "forbid" limit: int = Field(100, gt=0, le=100) offset: int = Field(0, ge=0) order_by: Literal["created_at", "updated_at"] = "created_at" tags: List[str] = [] @app.get("/items/") async def read_items(filter_query: Annotated[FilterParams, Query()]):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 522 bytes - Viewed (0) -
docs_src/dependencies/tutorial001_02_an.py
from typing import Union from fastapi import Depends, FastAPI from typing_extensions import Annotated app = FastAPI() async def common_parameters( q: Union[str, None] = None, skip: int = 0, limit: int = 100 ): return {"q": q, "skip": skip, "limit": limit} CommonsDep = Annotated[dict, Depends(common_parameters)] @app.get("/items/") async def read_items(commons: CommonsDep): return commons
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 495 bytes - Viewed (0)