Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 71 - 80 of 445 for item_1 (0.08 seconds)

  1. docs_src/dependencies/tutorial008c_py310.py

    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: str = Depends(get_username)):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
            )
        if item_id != "plumbus":
            raise HTTPException(
                status_code=404, detail="Item not found, there's only a plumbus here"
            )
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 660 bytes
    - Click Count (0)
  2. docs/de/docs/python-types.md

    {* ../../docs_src/python_types/tutorial007_py310.py hl[1] *}
    
    Das bedeutet:
    
    * Die Variable `items_t` ist ein `tuple` mit 3 Elementen, einem `int`, einem weiteren `int` und einem `str`.
    * Die Variable `items_s` ist ein `set`, und jedes seiner Elemente ist vom Typ `bytes`.
    
    #### Dict { #dict }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 12.6K bytes
    - Click Count (1)
  3. docs_src/dependencies/tutorial008c_an_py310.py

    
    @app.get("/items/{item_id}")
    def get_item(item_id: str, username: Annotated[str, Depends(get_username)]):
        if item_id == "portal-gun":
            raise InternalError(
                f"The portal gun is too dangerous to be owned by {username}"
            )
        if item_id != "plumbus":
            raise HTTPException(
                status_code=404, detail="Item not found, there's only a plumbus here"
            )
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 700 bytes
    - Click Count (0)
  4. docs/ko/docs/index.md

    브라우저로 [http://127.0.0.1:8000/items/5?q=somequery](http://127.0.0.1:8000/items/5?q=somequery)를 열어보십시오.
    
    아래의 JSON 응답을 볼 수 있습니다:
    
    ```JSON
    {"item_id": 5, "q": "somequery"}
    ```
    
    여러분은 벌써 API를 만들었습니다:
    
    * _경로_ `/` 및 `/items/{item_id}`에서 HTTP 요청 받기.
    * 두 _경로_ 모두 `GET` 연산(HTTP _메소드_ 로 알려진)을 받습니다.
    * _경로_ `/items/{item_id}`는 `int`형 이어야 하는 _경로 매개변수_ `item_id`를 가지고 있습니다.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 23.4K bytes
    - Click Count (0)
  5. README.md

        System.out.println(response.getContentAsString());
    }
    ```
    
    ### Asynchronous request
    
    ```java
    import org.codelibs.curl.Curl;
    
    Curl.post("https://api.example.com/items")
        .body("{\"name\":\"item1\"}")
        .header("Content-Type", "application/json")
        .execute(
            response -> System.out.println("Async status: " + response.getHttpStatusCode()),
            error -> error.printStackTrace());
    ```
    
    Created: Thu Apr 02 15:34:12 GMT 2026
    - Last Modified: Thu Nov 20 13:34:13 GMT 2025
    - 2.5K bytes
    - Click Count (0)
  6. docs/de/docs/index.md

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: float
        is_offer: bool | None = None
    
    
    @app.get("/")
    def read_root():
        return {"Hello": "World"}
    
    
    @app.get("/items/{item_id}")
    def read_item(item_id: int, q: str | None = None):
        return {"item_id": item_id, "q": q}
    
    
    @app.put("/items/{item_id}")
    def update_item(item_id: int, item: Item):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 23.6K bytes
    - Click Count (1)
  7. docs_src/query_params/tutorial006_py310.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_user_item(
        item_id: str, needy: str, skip: int = 0, limit: int | None = None
    ):
        item = {"item_id": item_id, "needy": needy, "skip": skip, "limit": limit}
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 269 bytes
    - Click Count (0)
  8. docs_src/path_params_numeric_validations/tutorial002_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Path
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        q: str, item_id: Annotated[int, Path(title="The ID of the item to get")]
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 311 bytes
    - Click Count (0)
  9. docs_src/path_params_numeric_validations/tutorial003_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Path
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        item_id: Annotated[int, Path(title="The ID of the item to get")], q: str
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 311 bytes
    - Click Count (0)
  10. docs_src/path_params_numeric_validations/tutorial001_py310.py

    from fastapi import FastAPI, Path, Query
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_items(
        item_id: int = Path(title="The ID of the item to get"),
        q: str | None = Query(default=None, alias="item-query"),
    ):
        results = {"item_id": item_id}
        if q:
            results.update({"q": q})
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 332 bytes
    - Click Count (0)
Back to Top