- Sort Score
- Result 10 results
- Languages All
Results 51 - 60 of 1,529 for _items (0.26 sec)
-
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}]
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 537 bytes - Viewed (0) -
tests/test_tutorial/test_websockets/test_tutorial002_an_py310.py
with client.websocket_connect("/items/foo/ws") as websocket: message = "Message one" websocket.send_text(message) data = websocket.receive_text() assert data == "Session cookie or query token value is: fakesession" data = websocket.receive_text() assert data == f"Message text was: {message}, for item ID: foo" message = "Message two"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 3.9K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial006_py310.py
@needs_py310 def test_read_item_name(client: TestClient): response = client.get("/items/bar/name") assert response.status_code == 200, response.text assert response.json() == {"name": "Bar", "description": "The Bar fighters"} @needs_py310 def test_read_item_public_data(client: TestClient): response = client.get("/items/bar/public") assert response.status_code == 200, response.text assert response.json() == {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 6.2K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial003.py
def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_not_found(): response = client.get("/items/bar") assert response.status_code == 404, response.text assert response.json() == {"message": "Item not found"} def test_openapi_schema():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 4.5K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial004_py39.py
return client @needs_py39 @pytest.mark.parametrize( "url,data", [ ("/items/foo", {"name": "Foo", "price": 50.2}), ( "/items/bar", {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2}, ), ( "/items/baz", { "name": "Baz", "description": None,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 5.2K bytes - Viewed (0) -
docs_src/dataclasses/tutorial003.py
@dataclass class Item: name: str description: Union[str, None] = None @dataclass class Author: name: str items: List[Item] = field(default_factory=list) # (3) app = FastAPI() @app.post("/authors/{author_id}/items/", response_model=Author) # (4) async def create_author_items(author_id: str, items: List[Item]): # (5)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Jul 31 14:09:15 UTC 2024 - 1.4K bytes - Viewed (0) -
tests/test_tutorial/test_bigger_applications/test_main.py
}, "/items/{item_id}": { "get": { "tags": ["items"], "summary": "Read Item", "operationId": "read_item_items__item_id__get", "parameters": [ { "required": True, "schema": {"title": "Item Id", "type": "string"},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 24.6K bytes - Viewed (0) -
docs_src/separate_openapi_schemas/tutorial001_py310.py
from fastapi import FastAPI from pydantic import BaseModel class Item(BaseModel): name: str description: str | None = None app = FastAPI() @app.post("/items/") def create_item(item: Item): return item @app.get("/items/") def read_items() -> list[Item]: return [ Item( name="Portal Gun", description="Device to travel through the multi-rick-verse",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 25 19:10:22 UTC 2023 - 451 bytes - Viewed (0) -
src/main/webapp/WEB-INF/orig/view/search.jsp
</c:if> <c:if test="${!empty lang}"> <c:forEach var="sLang" items="${lang}"> <c:forEach var="item" items="${langItems}"> <c:if test="${item.value==sLang}">${f:h(item.label)}</c:if> </c:forEach> </c:forEach> </c:if> </a></li> <c:if test="${displayLabelTypeItems}"> <li class="list-inline-item"><la:message key="labels.searchoptions_menu_labels" /> <a
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Sat Oct 26 01:07:52 UTC 2024 - 6.6K bytes - Viewed (0) -
src/main/webapp/WEB-INF/view/search.jsp
</c:if> <c:if test="${!empty lang}"> <c:forEach var="sLang" items="${lang}"> <c:forEach var="item" items="${langItems}"> <c:if test="${item.value==sLang}">${f:h(item.label)}</c:if> </c:forEach> </c:forEach> </c:if> </a></li> <c:if test="${displayLabelTypeItems}"> <li class="list-inline-item"><la:message key="labels.searchoptions_menu_labels" /> <a
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Sat Oct 26 01:07:52 UTC 2024 - 6.6K bytes - Viewed (0)