- Sort Score
- Result 10 results
- Languages All
Results 301 - 310 of 726 for item_a (0.07 sec)
-
docs/ja/docs/tutorial/path-params.md
Pythonのformat文字列と同様のシンタックスで「パスパラメータ」や「パス変数」を宣言できます: {* ../../docs_src/path_params/tutorial001.py hl[6,7] *} パスパラメータ `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の型アノテーションを使用して、関数内のパスパラメータの型を宣言できます:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 10.4K bytes - Viewed (0) -
docs/ru/docs/tutorial/handling-errors.md
Если клиент запросит `http://example.com/items/foo` (`item_id` `"foo"`), то он получит статус-код 200 и ответ в формате JSON: ```JSON { "item": "The Foo Wrestlers" } ``` Но если клиент запросит `http://example.com/items/bar` (несуществующий `item_id` `"bar"`), то он получит статус-код 404 (ошибка "не найдено") и JSON-ответ в виде: ```JSON { "detail": "Item not found" } ``` /// tip | Подсказка
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 14.1K bytes - Viewed (0) -
docs/es/docs/python-types.md
Harías lo mismo para declarar `tuple`s y `set`s: {* ../../docs_src/python_types/tutorial007_py39.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.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 16.4K bytes - Viewed (1) -
tests/test_tutorial/test_custom_response/test_tutorial001b.py
from docs_src.custom_response.tutorial001b_py39 import app client = TestClient(app) def test_get_custom_response(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1K bytes - Viewed (0) -
docs_src/custom_response/tutorial010_py39.py
from fastapi import FastAPI from fastapi.responses import ORJSONResponse app = FastAPI(default_response_class=ORJSONResponse) @app.get("/items/") async def read_items():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 205 bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial005_py39.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/", openapi_extra={"x-aperture-labs-portal": "blue"}) async def read_items():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 180 bytes - Viewed (0) -
docs_src/path_operation_configuration/tutorial006_py39.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/", tags=["items"]) async def read_items(): return [{"name": "Foo", "price": 42}] @app.get("/users/", tags=["users"]) async def read_users(): return [{"username": "johndoe"}] @app.get("/elements/", tags=["items"], deprecated=True) async def read_elements():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 365 bytes - Viewed (0) -
docs/en/docs/tutorial/handling-errors.md
```JSON { "item": "The Foo Wrestlers" } ``` But if the client requests `http://example.com/items/bar` (a non-existent `item_id` `"bar"`), that client will receive an HTTP status code of 404 (the "not found" error), and a JSON response of: ```JSON { "detail": "Item not found" } ``` /// tip When raising an `HTTPException`, you can pass any value that can be converted to JSON as the parameter `detail`, not only `str`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 9K bytes - Viewed (0) -
docs_src/path_operation_advanced_configuration/tutorial001_py39.py
from fastapi import FastAPI app = FastAPI() @app.get("/items/", operation_id="some_specific_id_you_define") async def read_items():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 167 bytes - Viewed (0) -
docs/de/docs/tutorial/handling-errors.md
### Die resultierende Response { #the-resulting-response } Wenn der Client `http://example.com/items/foo` anfordert (ein `item_id` `"foo"`), erhält dieser Client einen HTTP-Statuscode 200 und diese JSON-Response: ```JSON { "item": "The Foo Wrestlers" } ``` Aber wenn der Client `http://example.com/items/bar` anfordert (ein nicht-existierendes `item_id` `"bar"`), erhält er einen HTTP-Statuscode 404 (der „Not Found“-Error) und eine JSON-Response wie:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 10.4K bytes - Viewed (0)