- Sort Score
- Result 10 results
- Languages All
Results 281 - 290 of 413 for item_id (0.17 sec)
-
docs/zh/docs/tutorial/path-params.md
``` 这段代码把路径参数 `item_id` 的值传递给路径函数的参数 `item_id`。 运行示例并访问 <a href="http://127.0.0.1:8000/items/foo" class="external-link" target="_blank">http://127.0.0.1:8000/items/foo</a>,可获得如下响应: ```JSON {"item_id":"foo"} ``` ## 声明路径参数的类型 使用 Python 标准类型注解,声明路径操作函数中路径参数的类型。 ```Python hl_lines="7" {!../../docs_src/path_params/tutorial002.py!} ``` 本例把 `item_id` 的类型声明为 `int`。 /// check | "检查"
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.6K bytes - Viewed (0) -
tests/test_tutorial/test_query_params/test_tutorial006_py310.py
return c @needs_py310 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, } @needs_py310 def test_foo_no_needy(client: TestClient): response = client.get("/items/foo?skip=a&limit=b")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 6.2K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial006_py310.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Aug 04 20:47:07 UTC 2023 - 6.2K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial004_an.py
assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/items/{item_id}": { "put": { "summary": "Update Item", "operationId": "update_item_items__item_id__put", "parameters": [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 6.9K bytes - Viewed (0) -
tests/test_tutorial/test_events/test_tutorial001.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Wed Oct 18 12:36:40 UTC 2023 - 3.6K bytes - Viewed (0) -
docs/en/docs/tutorial/path-params-numeric-validations.md
/// ## Declare metadata You can declare all the same parameters as for `Query`. For example, to declare a `title` metadata value for the path parameter `item_id` you can type: //// tab | Python 3.10+ ```Python hl_lines="10" {!> ../../docs_src/path_params_numeric_validations/tutorial001_an_py310.py!} ``` //// //// tab | Python 3.9+
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.8K bytes - Viewed (0) -
docs/pt/docs/tutorial/path-params.md
{!../../docs_src/path_params/tutorial001.py!} ``` O valor do parâmetro que foi passado à `item_id` será passado para a sua função como o argumento `item_id`. Então, se você rodar este exemplo e for até <a href="http://127.0.0.1:8000/items/foo" class="external-link" target="_blank">http://127.0.0.1:8000/items/foo</a>, você verá a seguinte resposta: ```JSON {"item_id":"foo"} ``` ## Parâmetros da rota com tipos
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.8K bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial002.py
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.3K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial004_an_py39.py
assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/items/{item_id}": { "put": { "summary": "Update Item", "operationId": "update_item_items__item_id__put", "parameters": [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 7.1K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial004_py310.py
assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/items/{item_id}": { "put": { "summary": "Update Item", "operationId": "update_item_items__item_id__put", "parameters": [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 7.1K bytes - Viewed (0)