Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 201 - 210 of 402 for item_2 (0.04 seconds)

  1. docs/fr/docs/tutorial/query-params.md

    Dans ce cas, si vous allez sur :
    
    ```
    http://127.0.0.1:8000/items/foo?short=1
    ```
    
    ou
    
    ```
    http://127.0.0.1:8000/items/foo?short=True
    ```
    
    ou
    
    ```
    http://127.0.0.1:8000/items/foo?short=true
    ```
    
    ou
    
    ```
    http://127.0.0.1:8000/items/foo?short=on
    ```
    
    ou
    
    ```
    http://127.0.0.1:8000/items/foo?short=yes
    ```
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 5.3K bytes
    - Click Count (0)
  2. fastapi/param_functions.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")],
        ):
            return {"item_id": item_id}
        ```
        """
        return params.Path(
            default=default,
            default_factory=default_factory,
            alias=alias,
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 15 11:44:39 GMT 2026
    - 68K bytes
    - Click Count (0)
  3. docs/zh-hant/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md

    ```
    
    在某些情況下,你甚至可以在同一個 FastAPI 路徑操作(path operation)中同時使用 Pydantic v1 與 v2 模型:
    
    {* ../../docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py hl[2:3,6,12,21:22] *}
    
    在上面的範例中,輸入模型是 Pydantic v1,輸出模型(於 `response_model=ItemV2` 定義)是 Pydantic v2。
    
    ### Pydantic v1 參數 { #pydantic-v1-parameters }
    
    若你需要在 Pydantic v1 模型上使用 FastAPI 的參數工具(例如 `Body`、`Query`、`Form` 等),在完成遷移到 Pydantic v2 之前,可以從 `fastapi.temp_pydantic_v1_params` 匯入:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 4.9K bytes
    - Click Count (0)
  4. docs/ko/docs/python-types.md

    대괄호 안의 내부 타입은 "type parameters"라고 부릅니다.
    
    이 경우 `str`이 `list`에 전달된 타입 매개변수입니다.
    
    ///
    
    이는 "변수 `items`는 `list`이고, 이 `list`의 각 아이템은 `str`이다"라는 뜻입니다.
    
    이렇게 하면, 에디터는 리스트의 아이템을 처리하는 동안에도 지원을 제공할 수 있습니다:
    
    <img src="/img/python-types/image05.png">
    
    타입이 없으면, 이는 거의 불가능합니다.
    
    변수 `item`이 리스트 `items`의 요소 중 하나라는 점에 주목하세요.
    
    그리고 에디터는 여전히 이것이 `str`임을 알고, 그에 대한 지원을 제공합니다.
    
    #### Tuple과 Set { #tuple-and-set }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 13K bytes
    - Click Count (0)
  5. tests/main.py

        return "Hello World"
    
    
    @app.get("/path/{item_id}")
    def get_id(item_id):
        return item_id
    
    
    @app.get("/path/str/{item_id}")
    def get_str_id(item_id: str):
        return item_id
    
    
    @app.get("/path/int/{item_id}")
    def get_int_id(item_id: int):
        return item_id
    
    
    @app.get("/path/float/{item_id}")
    def get_float_id(item_id: float):
        return item_id
    
    
    @app.get("/path/bool/{item_id}")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 4.5K bytes
    - Click Count (0)
  6. docs/tr/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md

    {* ../../docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py hl[2:3,6,12,21:22] *}
    
    Yukarıdaki örnekte input modeli bir Pydantic v1 modelidir; output modeli ( `response_model=ItemV2` ile tanımlanan) ise bir Pydantic v2 modelidir.
    
    ### Pydantic v1 Parametreleri { #pydantic-v1-parameters }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 6K bytes
    - Click Count (0)
  7. docs/uk/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md

    {* ../../docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py hl[2:3,6,12,21:22] *}
    
    У наведеному вище прикладі вхідна модель - це модель Pydantic v1, а вихідна модель (визначена як `response_model=ItemV2`) - модель Pydantic v2.
    
    ### Параметри Pydantic v1 { #pydantic-v1-parameters }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 7.7K bytes
    - Click Count (0)
  8. docs/tr/docs/tutorial/bigger-applications.md

    ///
    
    ## `APIRouter` ile Başka Bir Module { #another-module-with-apirouter }
    
    Diyelim ki uygulamanızdaki "items" ile ilgili endpoint'ler de `app/routers/items.py` module’ünde olsun.
    
    Şunlar için *path operation*’larınız var:
    
    * `/items/`
    * `/items/{item_id}`
    
    Bu, `app/routers/users.py` ile aynı yapıdadır.
    
    Ancak biraz daha akıllı davranıp kodu sadeleştirmek istiyoruz.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 20.3K bytes
    - Click Count (0)
  9. docs/es/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md

    {* ../../docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py hl[2:3,6,12,21:22] *}
    
    En el ejemplo anterior, el modelo de entrada es un modelo de Pydantic v1 y el modelo de salida (definido en `response_model=ItemV2`) es un modelo de Pydantic v2.
    
    ### Parámetros de Pydantic v1 { #pydantic-v1-parameters }
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 5.7K bytes
    - Click Count (0)
  10. docs/uk/docs/tutorial/bigger-applications.md

    Припустімо, у вас також є кінцеві точки для обробки «items» у модулі `app/routers/items.py`.
    
    У вас є *операції шляху* для:
    
    * `/items/`
    * `/items/{item_id}`
    
    Структура така сама, як у `app/routers/users.py`.
    
    Але ми хочемо бути розумнішими й трохи спростити код.
    
    Ми знаємо, що всі *операції шляху* в цьому модулі мають однакові:
    
    * Префікс шляху `prefix`: `/items`.
    * `tags`: (лише одна мітка: `items`).
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 27.4K bytes
    - Click Count (0)
Back to Top