Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 851 for Items (0.12 seconds)

  1. docs_src/bigger_applications/app_an_py310/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
    
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 1011 bytes
    - Click Count (0)
  2. tests/test_additional_properties.py

    from inline_snapshot import snapshot
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Items(BaseModel):
        items: dict[str, int]
    
    
    @app.post("/foo")
    def foo(items: Items):
        return items.items
    
    
    client = TestClient(app)
    
    
    def test_additional_properties_post():
        response = client.post("/foo", json={"items": {"foo": 1, "bar": 2}})
        assert response.status_code == 200, response.text
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Feb 08 10:18:38 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  3. src/test/java/org/codelibs/fess/suggest/index/contents/DefaultContentsParserEdgeCaseTest.java

            List<SuggestItem> items = parser.parseDocument(document, supportedFields, tagFieldNames, roleFieldName, "lang",
                    defaultReadingConverter, defaultReadingConverter, defaultNormalizer, analyzer);
    
            assertTrue("Should have items from multiple fields", items.size() > 0);
    
            // Check that items come from different fields
    Created: Fri Apr 17 09:08:13 GMT 2026
    - Last Modified: Sat Mar 14 02:35:38 GMT 2026
    - 20.3K bytes
    - Click Count (0)
  4. tests/test_strict_content_type_nested.py

    inner_strict = APIRouter(prefix="/strict", strict_content_type=True)
    inner_default = APIRouter(prefix="/default")
    
    
    @inner_strict.post("/items/")
    async def inner_strict_post(data: dict):
        return data
    
    
    @inner_default.post("/items/")
    async def inner_default_post(data: dict):
        return data
    
    
    outer_router.include_router(inner_strict)
    outer_router.include_router(inner_default)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Feb 23 17:45:20 GMT 2026
    - 2.7K bytes
    - Click Count (0)
  5. guava-tests/benchmark/com/google/common/util/concurrent/MonitorBasedArrayBlockingQueue.java

       */
      private E extract() {
        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) {
        E[] items = this.items;
        // if removing front item, just advance
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 23 21:06:42 GMT 2026
    - 22.4K bytes
    - Click Count (0)
  6. docs_src/app_testing/tutorial004_py310.py

    from fastapi.testclient import TestClient
    
    items = {}
    
    
    @asynccontextmanager
    async def lifespan(app: FastAPI):
        items["foo"] = {"name": "Fighters"}
        items["bar"] = {"name": "Tenders"}
        yield
        # clean up items
        items.clear()
    
    
    app = FastAPI(lifespan=lifespan)
    
    
    @app.get("/items/{item_id}")
    async def read_items(item_id: str):
        return items[item_id]
    
    
    def test_read_items():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 1.2K bytes
    - Click Count (0)
  7. docs_src/stream_json_lines/tutorial001_py310.py

    def stream_items_no_async() -> Iterable[Item]:
        for item in items:
            yield item
    
    
    @app.get("/items/stream-no-annotation")
    async def stream_items_no_annotation():
        for item in items:
            yield item
    
    
    @app.get("/items/stream-no-async-no-annotation")
    def stream_items_no_async_no_annotation():
        for item in items:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 27 18:56:47 GMT 2026
    - 936 bytes
    - Click Count (0)
  8. docs_src/events/tutorial001_py310.py

    from fastapi import FastAPI
    
    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):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 283 bytes
    - Click Count (0)
  9. docs/en/docs/tutorial/bigger-applications.md

    * look for the subpackage `routers` (the directory at `app/routers/`)...
    * and from it, import the submodule `items` (the file at `app/routers/items.py`) and `users` (the file at `app/routers/users.py`)...
    
    The module `items` will have a variable `router` (`items.router`). This is the same one we created in the file `app/routers/items.py`, it's an `APIRouter` object.
    
    And then we do the same for the module `users`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Mar 07 09:29:03 GMT 2026
    - 19.2K bytes
    - Click Count (0)
  10. src/main/java/org/codelibs/fess/suggest/index/operations/IndexingOperations.java

        }
    
        /**
         * Indexes multiple suggest items with bad word filtering.
         *
         * @param index The index name
         * @param items The suggest items to index
         * @param badWords The list of bad words to filter against
         * @return The SuggestIndexResponse
         */
        public SuggestIndexResponse index(final String index, final SuggestItem[] items, final String[] badWords) {
    Created: Fri Apr 17 09:08:13 GMT 2026
    - Last Modified: Sun Feb 01 12:48:24 GMT 2026
    - 3.9K bytes
    - Click Count (0)
Back to Top