- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 1,655 for items (0.04 sec)
-
docs_src/response_model/tutorial006_py310.py
}, } @app.get( "/items/{item_id}/name", response_model=Item, response_model_include=["name", "description"], ) async def read_item_name(item_id: str): return items[item_id] @app.get("/items/{item_id}/public", response_model=Item, response_model_exclude=["tax"]) async def read_item_public_data(item_id: str):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 816 bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial003.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.4K bytes - Viewed (0) -
docs_src/extra_models/tutorial004_py39.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str items = [ {"name": "Foo", "description": "There comes my hero"}, {"name": "Red", "description": "It's my aeroplane"}, ] @app.get("/items/", response_model=list[Item]) async def read_items():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 356 bytes - Viewed (0) -
src/main/java/org/codelibs/fess/suggest/index/SuggestIndexer.java
} // TODO return result public SuggestIndexResponse index(final SuggestItem item) { return index(new SuggestItem[] { item }); } // TODO return result public SuggestIndexResponse index(final SuggestItem[] items) { // TODO parallel? final SuggestItem[] array = Stream.of(items).filter(item -> !item.isBadWord(badWords)).toArray(n -> new SuggestItem[n]); try {
Registered: Fri Nov 08 09:08:12 UTC 2024 - Last Modified: Sat Oct 12 00:10:39 UTC 2024 - 26.1K bytes - Viewed (0) -
tests/test_forms_from_non_typing_sequences.py
app = FastAPI() @app.post("/form/python-list") def post_form_param_list(items: list = Form()): return items @app.post("/form/python-set") def post_form_param_set(items: set = Form()): return items @app.post("/form/python-tuple") def post_form_param_tuple(items: tuple = Form()): return items client = TestClient(app) def test_python_list_param_as_form():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri May 13 23:38:22 UTC 2022 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008d_an.py
return client def test_get_no_item(client: TestClient): 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(client: TestClient): response = client.get("/items/plumbus") assert response.status_code == 200, response.text assert response.json() == "plumbus"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial004_an.py
"paths": { "/items/{item_id}": { "put": { "summary": "Update Item", "operationId": "update_item_items__item_id__put", "parameters": [ { "required": True, "schema": {"title": "Item Id", "type": "integer"},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 6.9K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial008c.py
return client def test_get_no_item(client: TestClient): 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(client: TestClient): response = client.get("/items/plumbus") assert response.status_code == 200, response.text assert response.json() == "plumbus"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Feb 24 23:06:37 UTC 2024 - 1.1K bytes - Viewed (0) -
tests/test_union_inherited_body.py
app = FastAPI() class Item(BaseModel): name: Optional[str] = None class ExtendedItem(Item): age: int @app.post("/items/") def save_union_different_body(item: Union[ExtendedItem, Item]): return {"item": item} client = TestClient(app) def test_post_extended_item(): response = client.post("/items/", json={"name": "Foo", "age": 5})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 5.2K bytes - Viewed (0) -
docs_src/app_testing/app_b/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"},
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Mar 13 19:07:10 UTC 2024 - 1.8K bytes - Viewed (0)