- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 799 for needy (0.02 sec)
-
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) -
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) -
docs_src/query_params/tutorial006_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 301 bytes - Viewed (0) -
docs/tr/docs/tutorial/query-params.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Aug 31 10:29:01 UTC 2025 - 5.2K bytes - Viewed (0) -
docs/en/docs/tutorial/query-params.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.5K bytes - Viewed (0) -
docs/fr/docs/tutorial/query-params.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Nov 09 16:39:20 UTC 2024 - 5.6K bytes - Viewed (0) -
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) -
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) -
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) -
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)