Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 854 for _id (0.12 sec)

  1. docs_src/extra_models/tutorial003_py310.py

        "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):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 644 bytes
    - Viewed (0)
  2. docs_src/query_params/tutorial004.py

    from typing import Union
    
    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/users/{user_id}/items/{item_id}")
    async def read_user_item(
        user_id: int, item_id: str, q: Union[str, None] = None, short: bool = False
    ):
        item = {"item_id": item_id, "owner_id": user_id}
        if q:
            item.update({"q": q})
        if not short:
            item.update(
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 468 bytes
    - Viewed (0)
  3. docs_src/bigger_applications/app_an_py39/routers/items.py

    @router.get("/")
    async def read_items():
        return fake_items_db
    
    
    @router.get("/{item_id}")
    async def read_item(item_id: str):
        if item_id not in fake_items_db:
            raise HTTPException(status_code=404, detail="Item not found")
        return {"name": fake_items_db[item_id]["name"], "item_id": item_id}
    
    
    @router.put(
        "/{item_id}",
        tags=["custom"],
        responses={403: {"description": "Operation forbidden"}},
    )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 1011 bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/es/config/cbean/ca/bs/BsThumbnailQueueCA.java

            setThumbnailId_Terms("thumbnail_id", opLambda, null);
        }
    
        public void setThumbnailId_Terms(ConditionOptionCall<TermsAggregationBuilder> opLambda, OperatorCall<BsThumbnailQueueCA> aggsLambda) {
            setThumbnailId_Terms("thumbnail_id", opLambda, aggsLambda);
        }
    
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 38.6K bytes
    - Viewed (0)
  5. istioctl/pkg/authz/testdata/configdump.yaml

                 }
                ],
                "stream_idle_timeout": "0s",
                "normalize_path": true,
                "request_id_extension": {
                 "typed_config": {
                  "@type": "type.googleapis.com/envoy.extensions.request_id.uuid.v3.UuidRequestIdConfig",
                  "use_request_id_for_trace_sampling": true
                 }
                },
                "path_with_escaped_slashes_action": "KEEP_UNCHANGED"
    Others
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Jun 21 14:20:23 GMT 2023
    - 206.7K bytes
    - Viewed (2)
  6. docs_src/query_params/tutorial002_py310.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: str, q: str | None = None):
        if q:
            return {"item_id": item_id, "q": q}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 219 bytes
    - Viewed (0)
  7. tests/test_starlette_exception.py

    app = FastAPI()
    
    items = {"foo": "The Foo Wrestlers"}
    
    
    @app.get("/items/{item_id}")
    async def read_item(item_id: str):
        if item_id not in items:
            raise HTTPException(
                status_code=404,
                detail="Item not found",
                headers={"X-Error": "Some custom header"},
            )
        return {"item": items[item_id]}
    
    
    @app.get("/http-no-body-statuscode-exception")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  8. docs_src/dataclasses/tutorial003.py

    @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)
        return {"name": author_id, "items": items}  # (6)
    
    
    @app.get("/authors/", response_model=List[Author])  # (7)
    def get_authors():  # (8)
        return [  # (9)
            {
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.4K bytes
    - Viewed (0)
  9. tests/test_put_no_body.py

    from fastapi.testclient import TestClient
    
    app = FastAPI()
    
    
    @app.put("/items/{item_id}")
    def save_item_no_body(item_id: str):
        return {"item_id": item_id}
    
    
    client = TestClient(app)
    
    
    def test_put_no_body():
        response = client.put("/items/foo")
        assert response.status_code == 200, response.text
        assert response.json() == {"item_id": "foo"}
    
    
    def test_put_no_body_with_body():
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  10. docs/em/docs/tutorial/path-params.md

    ๐Ÿ’– `/users/me`, โžก๏ธ ๐Ÿ’ฌ ๐Ÿ‘ˆ โšซ๏ธ ๐Ÿคš ๐Ÿ“Š ๐Ÿ”ƒ โฎ๏ธ ๐Ÿ‘ฉโ€๐Ÿ’ป.
    
    &amp; โคด๏ธ ๐Ÿ‘† ๐Ÿ’ช โœ”๏ธ โžก `/users/{user_id}` ๐Ÿคš ๐Ÿ’ฝ ๐Ÿ”ƒ ๐ŸŽฏ ๐Ÿ‘ฉโ€๐Ÿ’ป ๐Ÿ‘ฉโ€๐Ÿ’ป ๐Ÿ†”.
    
    โ†ฉ๏ธ *โžก ๐Ÿ› ๏ธ* ๐Ÿ”ฌ โœ”, ๐Ÿ‘† ๐Ÿ’ช โš’ ๐Ÿ’ญ ๐Ÿ‘ˆ โžก `/users/me` ๐Ÿ“ฃ โญ 1๏ธโƒฃ `/users/{user_id}`:
    
    ```Python hl_lines="6  11"
    {!../../../docs_src/path_params/tutorial003.py!}
    ```
    
    โช, โžก `/users/{user_id}` ๐Ÿ”œ ๐Ÿ `/users/me`, "๐Ÿ’ญ" ๐Ÿ‘ˆ โšซ๏ธ ๐Ÿ“จ ๐Ÿ”ข `user_id` โฎ๏ธ ๐Ÿ’ฒ `"me"`.
    
    โžก, ๐Ÿ‘† ๐Ÿšซ๐Ÿ”œ โ†” โžก ๐Ÿ› ๏ธ:
    
    ```Python hl_lines="6  11"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 7.7K bytes
    - Viewed (0)
Back to top