- Sort Score
- Num 10 results
- Language All
Results 381 - 390 of 543 for item_d (0.04 seconds)
-
tests/test_multi_body_errors.py
from pydantic import BaseModel, condecimal app = FastAPI() class Item(BaseModel): name: str age: condecimal(gt=Decimal(0.0)) # type: ignore @app.post("/items/") def save_item_no_body(item: list[Item]): return {"item": item} client = TestClient(app) def test_put_correct_body(): response = client.post("/items/", json=[{"name": "Foo", "age": 5}])
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 6.1K bytes - Click Count (0) -
docs_src/app_testing/app_b_an_py310/test_main.py
def test_read_nonexistent_item(): response = client.get("/items/baz", headers={"X-Token": "coneofsilence"}) assert response.status_code == 404 assert response.json() == {"detail": "Item not found"} def test_create_item(): response = client.post( "/items/", headers={"X-Token": "coneofsilence"},
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Thu Aug 15 22:31:16 GMT 2024 - 1.8K bytes - Click Count (0) -
docs_src/app_testing/app_b_py39/test_main.py
def test_read_nonexistent_item(): response = client.get("/items/baz", headers={"X-Token": "coneofsilence"}) assert response.status_code == 404 assert response.json() == {"detail": "Item not found"} def test_create_item(): response = client.post( "/items/", headers={"X-Token": "coneofsilence"},
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.8K bytes - Click Count (0) -
src/main/config/openapi/openapi-user.yaml
type: array items: type: string example: ["aaa"] related_contents: type: array items: type: string example: [] data: type: array items: type: objectCreated: Sat Dec 20 09:19:18 GMT 2025 - Last Modified: Thu May 09 06:31:27 GMT 2024 - 21.6K bytes - Click Count (0) -
docs_src/path_operation_configuration/tutorial002_py310.py
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, tags=["items"]) async def create_item(item: Item): return item @app.get("/items/", tags=["items"]) async def read_items(): return [{"name": "Foo", "price": 42}]
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 537 bytes - Click Count (0) -
docs_src/dependencies/tutorial003_py310.py
self.q = q self.skip = skip self.limit = limit @app.get("/items/") async def read_items(commons=Depends(CommonQueryParams)): response = {} if commons.q: response.update({"q": commons.q}) items = fake_items_db[commons.skip : commons.skip + commons.limit] response.update({"items": items})Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 603 bytes - Click Count (0) -
docs_src/generate_clients/tutorial003_py39.py
class Item(BaseModel): name: str price: float class ResponseMessage(BaseModel): message: str class User(BaseModel): username: str email: str @app.post("/items/", response_model=ResponseMessage, tags=["items"]) async def create_item(item: Item): return {"message": "Item received"} @app.get("/items/", response_model=list[Item], tags=["items"])Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Mar 04 22:02:18 GMT 2022 - 914 bytes - Click Count (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial002b.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.7K bytes - Click Count (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py
}, "summary": "Create an item", "description": "Create an item with all the information:\n\n- **name**: each item must have a name\n- **description**: a long description\n- **price**: required\n- **tax**: if the item doesn't have tax, you can omit this\n- **tags**: a set of unique tag strings for this item", "operationId": "create_item_items__post",Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 20 15:55:38 GMT 2025 - 5K bytes - Click Count (0) -
tests/test_tutorial/test_dependencies/test_tutorial008d.py
def test_get_no_item(mod: ModuleType): client = TestClient(mod.app) response = client.get("/items/foo") assert response.status_code == 404, response.text assert response.json() == {"detail": "Item not found, there's only a plumbus here"} def test_get(mod: ModuleType): client = TestClient(mod.app) response = client.get("/items/plumbus") assert response.status_code == 200, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 1.4K bytes - Click Count (0)