Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,384 for Items (0.15 sec)

  1. docs_src/bigger_applications/app/routers/items.py

    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
    
    
    @router.get("/{item_id}")
    async def read_item(item_id: str):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Nov 29 17:32:18 GMT 2020
    - 1011 bytes
    - Viewed (0)
  2. docs_src/bigger_applications/app_an/routers/items.py

    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
    
    
    @router.get("/{item_id}")
    async def read_item(item_id: str):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1011 bytes
    - Viewed (0)
  3. docs_src/bigger_applications/app_an_py39/routers/items.py

    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
    
    
    @router.get("/{item_id}")
    async def read_item(item_id: str):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1011 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_dependencies/test_tutorial004.py

                },
            ),
            (
                "/items?q=foo&skip=1",
                200,
                {"items": [{"item_name": "Bar"}, {"item_name": "Baz"}], "q": "foo"},
            ),
            (
                "/items?q=bar&limit=2",
                200,
                {"items": [{"item_name": "Foo"}, {"item_name": "Bar"}], "q": "bar"},
            ),
            (
                "/items?q=bar&skip=1&limit=1",
                200,
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 5.4K bytes
    - Viewed (0)
  5. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

       */
      private E extract() {
        final E[] items = this.items;
        E x = items[takeIndex];
        items[takeIndex] = null;
        takeIndex = inc(takeIndex);
        --count;
        return x;
      }
    
      /**
       * Utility for remove and iterator.remove: Delete item at position i. Call only when occupying
       * monitor.
       */
      void removeAt(int i) {
        final E[] items = this.items;
        // if removing front item, just advance
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 19 19:24:36 GMT 2023
    - 22.5K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_separate_openapi_schemas/test_tutorial002_py310.py

        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items/": {
                    "get": {
                        "summary": "Read Items",
                        "operationId": "read_items_items__get",
                        "responses": {
                            "200": {
                                "description": "Successful Response",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  7. docs_src/dependencies/tutorial004_py310.py

            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
        response.update({"items": items})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 607 bytes
    - Viewed (0)
  8. docs_src/dependencies/tutorial002_an_py39.py

        if commons.q:
            response.update({"q": commons.q})
        items = fake_items_db[commons.skip : commons.skip + commons.limit]
        response.update({"items": items})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 677 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_testing_dependencies/test_tutorial001_an_py39.py

    
    @needs_py39
    def test_override_in_items_run():
        from docs_src.dependency_testing.tutorial001_an_py39 import test_override_in_items
    
        test_override_in_items()
    
    
    @needs_py39
    def test_override_in_items_with_q_run():
        from docs_src.dependency_testing.tutorial001_an_py39 import (
            test_override_in_items_with_q,
        )
    
        test_override_in_items_with_q()
    
    
    @needs_py39
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_extra_models/test_tutorial004_py39.py

                                            "type": "array",
                                            "items": {"$ref": "#/components/schemas/Item"},
                                        }
                                    }
                                },
                            }
                        },
                        "summary": "Read Items",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.1K bytes
    - Viewed (0)
Back to top