Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 121 - 130 of 339 for item_2 (0.06 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. docs_src/query_params_str_validations/tutorial003_py310.py

    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: str | None = Query(default=None, min_length=3, max_length=50)):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        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
    - 290 bytes
    - Click Count (0)
  2. tests/test_tutorial/test_body_multiple_params/test_tutorial004.py

        response = client.put(
            "/items/5",
            json={
                "importance": 2,
                "item": {"name": "Foo", "price": 50.5},
                "user": {"username": "Dave"},
            },
            params={"q": "somequery"},
        )
        assert response.status_code == 200
        assert response.json() == {
            "item_id": 5,
            "importance": 2,
            "item": {
                "name": "Foo",
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 10K bytes
    - Click Count (0)
  3. docs_src/query_params_str_validations/tutorial005_an_py310.py

    from typing import Annotated
    
    from fastapi import FastAPI, Query
    
    app = FastAPI()
    
    
    @app.get("/items/")
    async def read_items(q: Annotated[str, Query(min_length=3)] = "fixedquery"):
        results = {"items": [{"item_id": "Foo"}, {"item_id": "Bar"}]}
        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
    - 309 bytes
    - Click Count (0)
  4. src/test/java/org/codelibs/fess/util/OptionalUtilTest.java

            assertTrue(result.isPresent());
            assertEquals(testValue, result.get());
        }
    
        @Test
        public void test_ofNullable_withList() {
            List<String> testValue = Arrays.asList("item1", "item2", "item3");
            OptionalEntity<List<String>> result = OptionalUtil.ofNullable(testValue);
    
            assertNotNull(result);
            assertTrue(result.isPresent());
            assertEquals(testValue, result.get());
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Fri Mar 13 23:01:26 GMT 2026
    - 13.3K bytes
    - Click Count (0)
  5. docs/es/docs/python-types.md

    Harías lo mismo para declarar `tuple`s y `set`s:
    
    {* ../../docs_src/python_types/tutorial007_py310.py hl[1] *}
    
    Esto significa:
    
    * La variable `items_t` es un `tuple` con 3 ítems, un `int`, otro `int`, y un `str`.
    * La variable `items_s` es un `set`, y cada uno de sus ítems es del tipo `bytes`.
    
    #### Dict { #dict }
    
    Para definir un `dict`, pasas 2 parámetros de tipo, separados por comas.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:15:55 GMT 2026
    - 11.6K bytes
    - Click Count (1)
  6. docs/pt/docs/python-types.md

    ///
    
    Isso significa: "a variável `items` é uma `list`, e cada um dos itens desta lista é uma `str`".
    
    Ao fazer isso, seu editor pode fornecer suporte mesmo durante o processamento de itens da lista:
    
    <img src="/img/python-types/image05.png">
    
    Sem tipos, isso é quase impossível de alcançar.
    
    Observe que a variável `item` é um dos elementos da lista `items`.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:20:43 GMT 2026
    - 11.7K bytes
    - Click Count (0)
  7. tests/test_tutorial/test_body_updates/test_tutorial001.py

                            },
                            "summary": "Read Item",
                            "operationId": "read_item_items__item_id__get",
                            "parameters": [
                                {
                                    "required": True,
                                    "schema": {"title": "Item Id", "type": "string"},
                                    "name": "item_id",
                                    "in": "path",
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 7.3K bytes
    - Click Count (0)
  8. docs_src/additional_responses/tutorial002_py310.py

    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        id: str
        value: str
    
    
    app = FastAPI()
    
    
    @app.get(
        "/items/{item_id}",
        response_model=Item,
        responses={
            200: {
                "content": {"image/png": {}},
                "description": "Return the JSON item or an image.",
            }
        },
    )
    async def read_item(item_id: str, img: bool | None = None):
        if img:
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 10 08:55:32 GMT 2025
    - 596 bytes
    - Click Count (0)
  9. docs/ko/docs/tutorial/path-params-numeric-validations.md

    `Annotated`를 사용하기 전에 최소 0.95.1까지 [FastAPI 버전 업그레이드](../deployment/versions.md#upgrading-the-fastapi-versions)를 꼭 하세요.
    
    ///
    
    ## 메타데이터 선언 { #declare-metadata }
    
    `Query`에 동일한 매개변수를 선언할 수 있습니다.
    
    예를 들어, 경로 매개변수 `item_id`에 `title` 메타데이터 값을 선언하려면 다음과 같이 입력할 수 있습니다:
    
    {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[10] *}
    
    /// note | 참고
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 7.2K bytes
    - Click Count (0)
  10. docs/zh/docs/tutorial/path-params-numeric-validations.md

    如果你使用的是更旧的版本,尝试使用 `Annotated` 会报错。
    
    请确保在使用 `Annotated` 之前,将 FastAPI 版本[升级](../deployment/versions.md#upgrading-the-fastapi-versions)到至少 0.95.1。
    
    ///
    
    ## 声明元数据 { #declare-metadata }
    
    你可以声明与 `Query` 相同的所有参数。
    
    例如,要为路径参数 `item_id` 声明 `title` 元数据值,你可以这样写:
    
    {* ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py hl[10] *}
    
    /// note | 注意
    
    路径参数总是必需的,因为它必须是路径的一部分。即使你将其声明为 `None` 或设置了默认值,也不会产生任何影响,它依然始终是必需参数。
    
    ///
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 6K bytes
    - Click Count (0)
Back to Top