- Sort Score
- Num 10 results
- Language All
Results 111 - 120 of 378 for item_1 (0.04 seconds)
-
docs_src/body_multiple_params/tutorial004_an_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,
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 674 bytes - Click Count (0) -
impl/maven-core/src/test/java/org/apache/maven/configuration/internal/EnhancedCompositeBeanHelperTest.java
PlexusConfiguration config = new XmlPlexusConfiguration("test"); config.setValue("item1"); when(evaluator.evaluate("item1")).thenReturn("item1"); helper.setProperty(bean, "item", String.class, config); assertEquals(1, bean.getItems().size()); assertEquals("item1", bean.getItems().get(0)); } @Test
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Nov 12 14:59:46 GMT 2025 - 8.7K bytes - Click Count (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial010.py
"items": [{"item_id": "Foo"}, {"item_id": "Bar"}], "q": "fixedquery", } def test_query_params_str_validations_q_fixedquery(client: TestClient): response = client.get("/items/", params={"q": "fixedquery"}) assert response.status_code == 200 assert response.json() == {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]} def test_query_params_str_validations_item_query_nonregexquery(client: TestClient):Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 5.8K bytes - Click Count (0) -
docs_src/dependencies/tutorial008c_py39.py
@app.get("/items/{item_id}") def get_item(item_id: str, username: str = Depends(get_username)): if item_id == "portal-gun": raise InternalError( f"The portal gun is too dangerous to be owned by {username}" ) if item_id != "plumbus": raise HTTPException( status_code=404, detail="Item not found, there's only a plumbus here" )
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 660 bytes - Click Count (0) -
docs_src/app_testing/tutorial003_py39.py
app = FastAPI() items = {} @app.on_event("startup") async def startup_event(): items["foo"] = {"name": "Fighters"} items["bar"] = {"name": "Tenders"} @app.get("/items/{item_id}") async def read_items(item_id: str): return items[item_id] def test_read_items(): with TestClient(app) as client: response = client.get("/items/foo")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 528 bytes - Click Count (0) -
docs_src/additional_status_codes/tutorial001_an_py310.py
app = FastAPI() items = {"foo": {"name": "Fighters", "size": 6}, "bar": {"name": "Tenders", "size": 3}} @app.put("/items/{item_id}") async def upsert_item( item_id: str, name: Annotated[str | None, Body()] = None, size: Annotated[int | None, Body()] = None, ): if item_id in items: item = items[item_id] item["name"] = name item["size"] = size
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 686 bytes - Click Count (0) -
docs_src/schema_extra_example/tutorial005_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( openapi_examples={ "normal": {
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Aug 26 18:03:13 GMT 2023 - 1.5K bytes - Click Count (0) -
docs_src/handling_errors/tutorial004_py39.py
return PlainTextResponse(message, status_code=400) @app.get("/items/{item_id}") async def read_item(item_id: int): if item_id == 3: raise HTTPException(status_code=418, detail="Nope! I don't like 3.")
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 920 bytes - Click Count (0) -
docs_src/response_model/tutorial004_py39.py
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 627 bytes - Click Count (0) -
docs_src/query_params/tutorial005_py39.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/{item_id}") async def read_user_item(item_id: str, needy: str): item = {"item_id": item_id, "needy": needy}
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 192 bytes - Click Count (0)