Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 392 for needy (0.01 sec)

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

          "loc": [
            "query",
            "needy"
          ],
          "msg": "Field required",
          "input": null
        }
      ]
    }
    ```
    
    Da `needy` ein erforderlicher Parameter ist, müssen Sie ihn in der URL setzen:
    
    ```
    http://127.0.0.1:8000/items/foo-item?needy=sooooneedy
    ```
    
    ... Das funktioniert:
    
    ```JSON
    {
        "item_id": "foo-item",
        "needy": "sooooneedy"
    }
    ```
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 5K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/query-params.md

        ]
    }
    ```
    
    `needy` 是必选参数,因此要在 URL 中设置值:
    
    ```
    http://127.0.0.1:8000/items/foo-item?needy=sooooneedy
    ```
    
    ……这样就正常了:
    
    ```JSON
    {
        "item_id": "foo-item",
        "needy": "sooooneedy"
    }
    ```
    
    当然,把一些参数定义为必选,为另一些参数设置默认值,再把其它参数定义为可选,这些操作都是可以的:
    
    {* ../../docs_src/query_params/tutorial006_py310.py hl[8] *}
    
    本例中有 3 个查询参数:
    
    * `needy`,必选的 `str` 类型参数
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  3. docs_src/query_params/tutorial006_py39.py

    from typing import Union
    
    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: Union[int, None] = None
    ):
        item = {"item_id": item_id, "needy": needy, "skip": skip, "limit": limit}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 301 bytes
    - Viewed (0)
  4. docs/tr/docs/tutorial/query-params.md

          "loc": [
            "query",
            "needy"
          ],
          "msg": "Field required",
          "input": null
        }
      ]
    }
    ```
    
    `needy` zorunlu bir parametre olduğundan dolayı bağlantıda tanımlanması gerekir:
    
    ```
    http://127.0.0.1:8000/items/foo-item?needy=sooooneedy
    ```
    
    ...bu iş görür:
    
    ```JSON
    {
        "item_id": "foo-item",
        "needy": "sooooneedy"
    }
    ```
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 10:29:01 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/query-params.md

            "query",
            "needy"
          ],
          "msg": "Field required",
          "input": null
        }
      ]
    }
    ```
    
    As `needy` is a required parameter, you would need to set it in the URL:
    
    ```
    http://127.0.0.1:8000/items/foo-item?needy=sooooneedy
    ```
    
    ...this would work:
    
    ```JSON
    {
        "item_id": "foo-item",
        "needy": "sooooneedy"
    }
    ```
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 4.5K bytes
    - Viewed (0)
  6. docs/fr/docs/tutorial/query-params.md

    Ici le paramètre `needy` est un paramètre requis (ou obligatoire) de type `str`.
    
    Si vous ouvrez une URL comme :
    
    ```
    http://127.0.0.1:8000/items/foo-item
    ```
    
    ...sans ajouter le paramètre requis `needy`, vous aurez une erreur :
    
    ```JSON
    {
        "detail": [
            {
                "loc": [
                    "query",
                    "needy"
                ],
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Nov 09 16:39:20 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  7. docs_src/query_params/tutorial005_py39.py

    from fastapi import FastAPI
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}")
    async def read_user_item(item_id: str, needy: str):
        item = {"item_id": item_id, "needy": needy}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 192 bytes
    - Viewed (0)
  8. tests/test_tutorial/test_query_params/test_tutorial006.py

        c = TestClient(mod.app)
        return c
    
    
    def test_foo_needy_very(client: TestClient):
        response = client.get("/items/foo?needy=very")
        assert response.status_code == 200
        assert response.json() == {
            "item_id": "foo",
            "needy": "very",
            "skip": 0,
            "limit": None,
        }
    
    
    def test_foo_no_needy(client: TestClient):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 5.3K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_query_params/test_tutorial005.py

    from docs_src.query_params.tutorial005_py39 import app
    
    client = TestClient(app)
    
    
    def test_foo_needy_very():
        response = client.get("/items/foo?needy=very")
        assert response.status_code == 200
        assert response.json() == {"item_id": "foo", "needy": "very"}
    
    
    def test_foo_no_needy():
        response = client.get("/items/foo")
        assert response.status_code == 422
        assert response.json() == {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/query-params.md

    Aqui o parâmetro de consulta `needy` é um valor obrigatório, do tipo `str`.
    
    Se você abrir no seu navegador a URL:
    
    ```
    http://127.0.0.1:8000/items/foo-item
    ```
    
    ... sem adicionar o parâmetro obrigatório `needy`, você verá um erro como:
    
    ```JSON
    {
      "detail": [
        {
          "type": "missing",
          "loc": [
            "query",
            "needy"
          ],
          "msg": "Field required",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 5K bytes
    - Viewed (0)
Back to top