Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 525 for item01 (0.34 sec)

  1. tests/test_infer_param_optionality.py

    
    def test_get_item_1():
        """Check that /items/{item_id} returns expected data"""
        response = client.get("/items/item01")
        assert response.status_code == 200, response.text
        assert response.json() == {"item_id": "item01"}
    
    
    def test_get_item_2():
        """Check that /items/{item_id} returns expected data with user_id specified"""
        response = client.get("/items/item01?user_id=abc123")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 12.1K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_python_types/test_tutorial005.py

    from docs_src.python_types.tutorial005_py39 import get_items
    
    
    def test_get_items():
        res = get_items(
            "item_a",
            "item_b",
            "item_c",
            "item_d",
            "item_e",
        )
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 271 bytes
    - Viewed (0)
  3. tests/test_schema_extra_examples.py

                return item
    
        @app.post("/examples/")
        def examples(
            item: Item = Body(
                examples=[
                    {"data": "Data in Body examples, example1"},
                    {"data": "Data in Body examples, example2"},
                ],
            ),
        ):
            return item
    
        with pytest.warns(FastAPIDeprecationWarning):
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 32.2K bytes
    - Viewed (0)
  4. src/test/java/org/codelibs/fess/suggest/index/writer/SuggestIndexWriterTest.java

            SuggestItem item5 = new SuggestItem(new String[] { "ใƒ†ใ‚นใƒˆ" }, readings, new String[] { "content" }, 5, 0, -1, new String[] { "tag1" },
                    new String[] { SuggestConstants.DEFAULT_ROLE }, null, SuggestItem.Kind.DOCUMENT);
    
            SuggestItem[] mergedItems = writer.mergeItems(new SuggestItem[] { item1, item2, item3, item4, item5 });
    
            assertNotNull(mergedItems);
    Registered: Sat Dec 20 13:04:59 UTC 2025
    - Last Modified: Mon Nov 24 03:40:05 UTC 2025
    - 18.2K bytes
    - Viewed (0)
  5. docs_src/extra_models/tutorial003_py39.py

        size: int
    
    
    items = {
        "item1": {"description": "All my friends drive a low rider", "type": "car"},
        "item2": {
            "description": "Music is my aeroplane, it's my aeroplane",
            "type": "plane",
            "size": 5,
        },
    }
    
    
    @app.get("/items/{item_id}", response_model=Union[PlaneItem, CarItem])
    async def read_item(item_id: str):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 644 bytes
    - Viewed (0)
  6. docs_src/python_types/tutorial005_py39.py

    def get_items(item_a: str, item_b: int, item_c: float, item_d: bool, item_e: bytes):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 06:40:21 UTC 2025
    - 135 bytes
    - Viewed (0)
  7. tests/test_generate_unique_id_function.py

        @app.post("/", response_model=list[Item], responses={404: {"model": list[Message]}})
        def post_root(item1: Item, item2: Item):
            return item1, item2  # pragma: nocover
    
        @router.post(
            "/router", response_model=list[Item], responses={404: {"model": list[Message]}}
        )
        def post_router(item1: Item, item2: Item):
            return item1, item2  # pragma: nocover
    
        app.include_router(router)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 66.7K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_path_params/test_tutorial002.py

    def test_get_items():
        response = client.get("/items/1")
        assert response.status_code == 200, response.text
        assert response.json() == {"item_id": 1}
    
    
    def test_get_items_invalid_id():
        response = client.get("/items/item1")
        assert response.status_code == 422, response.text
        assert response.json() == {
            "detail": [
                {
                    "input": "item1",
                    "loc": ["path", "item_id"],
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 4.2K bytes
    - Viewed (0)
  9. docs_src/bigger_applications/app_py39/routers/items.py

    from fastapi import APIRouter, Depends, HTTPException
    
    from ..dependencies import get_token_header
    
    router = APIRouter(
        prefix="/items",
        tags=["items"],
        dependencies=[Depends(get_token_header)],
        responses={404: {"description": "Not found"}},
    )
    
    
    fake_items_db = {"plumbus": {"name": "Plumbus"}, "gun": {"name": "Portal Gun"}}
    
    
    @router.get("/")
    async def read_items():
        return fake_items_db
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1011 bytes
    - Viewed (0)
  10. tests/test_tutorial/test_python_types/test_tutorial006.py

    
    def test_process_items():
        with patch("builtins.print") as mock_print:
            process_items(["item_a", "item_b", "item_c"])
    
        assert mock_print.call_count == 3
        call_args = [arg.args for arg in mock_print.call_args_list]
        assert call_args == [
            ("item_a",),
            ("item_b",),
            ("item_c",),
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 426 bytes
    - Viewed (0)
Back to top