- Sort Score
- Result 10 results
- Languages All
Results 601 - 610 of 3,646 for nope (0.03 sec)
-
docs_src/path_operation_configuration/tutorial004.py
from typing import Set, 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: Set[str] = set() @app.post("/items/", response_model=Item, summary="Create an item") async def create_item(item: Item): """ Create an item with all the information:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 681 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial005_py310.py
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: set[str] = set() @app.post( "/items/", response_model=Item, summary="Create an item", response_description="The created item", ) 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 - 698 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial004.py
name: str description: Union[str, None] = None price: float tax: Union[float, None] = None class User(BaseModel): username: str full_name: Union[str, None] = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Item, user: User, importance: int = Body(gt=0), q: Union[str, None] = None, ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Mar 10 18:49:18 UTC 2023 - 653 bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial001_pv1.py
from typing import 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 class Config: schema_extra = { "examples": [ { "name": "Foo", "description": "A very nice Item",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 669 bytes - Viewed (0) -
docs_src/schema_extra_example/tutorial003_an_py39.py
from typing import Annotated, Union from fastapi import Body, FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None @app.put("/items/{item_id}") async def update_item( item_id: int, item: Annotated[ Item, Body( examples=[ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 692 bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001.py
async def override_dependency(q: Union[str, None] = None): return {"q": q, "skip": 5, "limit": 10} app.dependency_overrides[common_parameters] = override_dependency def test_override_in_items(): response = client.get("/items/") assert response.status_code == 200 assert response.json() == { "message": "Hello Items!", "params": {"q": None, "skip": 5, "limit": 10}, }
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 1.5K bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001_an_py310.py
async def override_dependency(q: str | None = None): return {"q": q, "skip": 5, "limit": 10} app.dependency_overrides[common_parameters] = override_dependency def test_override_in_items(): response = client.get("/items/") assert response.status_code == 200 assert response.json() == { "message": "Hello Items!", "params": {"q": None, "skip": 5, "limit": 10}, }
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.5K bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial004_an.py
name: str description: Union[str, None] = None price: float tax: Union[float, None] = None class User(BaseModel): username: str full_name: Union[str, None] = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Item, user: User, importance: Annotated[int, Body(gt=0)], q: Union[str, None] = None, ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 703 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial004_an_py39.py
name: str description: Union[str, None] = None price: float tax: Union[float, None] = None class User(BaseModel): username: str full_name: Union[str, None] = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Item, user: User, importance: Annotated[int, Body(gt=0)], q: Union[str, None] = None, ):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 674 bytes - Viewed (0) -
docs_src/response_model/tutorial001.py
from typing import Any, 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.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 - 562 bytes - Viewed (0)