- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 540 for item_c (0.04 sec)
-
docs_src/schema_extra_example/tutorial004_an_py39.py
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=[ { "name": "Foo",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Jul 01 16:43:29 UTC 2023 - 936 bytes - Viewed (0) -
docs_src/body_fields/tutorial001_an_py39.py
app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = Field( default=None, title="The description of the item", max_length=300 ) price: float = Field(gt=0, description="The price must be greater than zero") tax: Union[float, None] = None @app.put("/items/{item_id}") async def update_item(item_id: int, item: Annotated[Item, Body(embed=True)]):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 582 bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial004_py39.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): 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),
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 653 bytes - Viewed (0) -
tests/test_tutorial/test_path_params_numeric_validations/test_tutorial006.py
) return TestClient(mod.app) @pytest.mark.parametrize( "path,expected_response", [ ( "/items/0?q=&size=0.1", {"item_id": 0, "size": 0.1}, ), ( "/items/1000?q=somequery&size=10.4", {"item_id": 1000, "q": "somequery", "size": 10.4}, ), ], ) def test_read_items(client: TestClient, path, expected_response):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 7.3K bytes - Viewed (0) -
src/test/java/org/codelibs/core/io/SerializeUtilTest.java
assertEquals(arr.length, result.length); assertEquals(arr[0], result[0]); // Test ArrayList final List<String> list = new ArrayList<>(); list.add("item1"); list.add("item2"); binary = SerializeUtil.fromObjectToBinary(list); @SuppressWarnings("unchecked") final List<String> resultList = (List<String>) SerializeUtil.fromBinaryToObject(binary);
Registered: Sat Dec 20 08:55:33 UTC 2025 - Last Modified: Sat Nov 22 11:21:59 UTC 2025 - 7.6K bytes - Viewed (0) -
docs_src/query_params/tutorial002_py310.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 219 bytes - Viewed (0) -
docs_src/path_params/tutorial002_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 143 bytes - Viewed (0) -
tests/test_put_no_body.py
from fastapi.testclient import TestClient app = FastAPI() @app.put("/items/{item_id}") def save_item_no_body(item_id: str): return {"item_id": item_id} client = TestClient(app) def test_put_no_body(): response = client.put("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"item_id": "foo"} def test_put_no_body_with_body():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.3K bytes - Viewed (0) -
docs_src/query_params/tutorial002_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 251 bytes - Viewed (0) -
tests/test_validation_error_context.py
await websocket.close() # pragma: no cover @sub_app.websocket("/ws/{item_id}") async def subapp_websocket_endpoint(websocket: WebSocket, item_id: int): await websocket.accept() # pragma: no cover await websocket.send_text(f"Item: {item_id}") # pragma: no cover await websocket.close() # pragma: no cover client = TestClient(app)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 06 12:21:57 UTC 2025 - 4.7K bytes - Viewed (0)