- Sort Score
- Result 10 results
- Languages All
Results 181 - 190 of 1,072 for Str (0.03 sec)
-
scripts/docs.py
return "insiders" in version def get_en_config() -> Dict[str, Any]: return mkdocs.utils.yaml_load(en_config_path.read_text(encoding="utf-8")) def get_lang_paths() -> List[Path]: return sorted(docs_path.iterdir()) def lang_callback(lang: Optional[str]) -> Union[str, None]: if lang is None: return None lang = lang.lower() return lang
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 08 11:01:17 UTC 2024 - 13.5K bytes - Viewed (0) -
tests/test_additional_responses_router.py
@router.get( "/c", responses={ "400": {"description": "Error with str"}, "5xx": {"description": "Error with range, lower"}, "default": {"description": "A default response"}, }, ) async def c(): return "c" @router.get( "/d", responses={ "400": {"description": "Error with str"}, "5XX": {"model": ResponseModel}, "default": {"model": ResponseModel},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 5.1K bytes - Viewed (0) -
fastapi/types.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Dec 12 00:29:03 UTC 2023 - 383 bytes - Viewed (0) -
docs_src/body/tutorial004_py310.py
from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None app = FastAPI() @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item, q: str | None = None): result = {"item_id": item_id, **item.dict()} if q: result.update({"q": q})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Jan 09 14:28:58 UTC 2024 - 408 bytes - Viewed (0) -
docs_src/body_nested_models/tutorial002.py
from typing import List, Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: List[str] = [] @app.put("/items/{item_id}") async def update_item(item_id: int, item: Item): results = {"item_id": item_id, "item": item}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 413 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial001.py
from typing import Set, Union from fastapi import FastAPI, status from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: Set[str] = set() @app.post("/items/", response_model=Item, status_code=status.HTTP_201_CREATED) async def create_item(item: Item):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 406 bytes - Viewed (0) -
tests/test_repeated_dependency_schema.py
from fastapi.testclient import TestClient 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)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.2K bytes - Viewed (0) -
docs_src/cookie_param_models/tutorial001_py310.py
from fastapi import Cookie, FastAPI from pydantic import BaseModel app = FastAPI() class Cookies(BaseModel): session_id: str fatebook_tracker: str | None = None googall_tracker: str | None = None @app.get("/items/") async def read_items(cookies: Cookies = Cookie()):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 303 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial001_py310.py
from fastapi import FastAPI, status from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: set[str] = set() @app.post("/items/", response_model=Item, status_code=status.HTTP_201_CREATED) async def create_item(item: Item):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 363 bytes - Viewed (0) -
docs_src/response_model/tutorial001_py310.py
from typing import Any from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None tags: list[str] = [] @app.post("/items/", response_model=Item) async def create_item(item: Item) -> Any: return item @app.get("/items/", response_model=list[Item])
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jan 07 13:45:48 UTC 2023 - 537 bytes - Viewed (0)