- Sort Score
- Result 10 results
- Languages All
Results 431 - 440 of 550 for tutorial008d_py39 (0.06 sec)
-
tests/test_tutorial/test_path_operation_configurations/test_tutorial001.py
import pytest from dirty_equals import IsList from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest) -> TestClient: mod = importlib.import_module(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 6.2K bytes - Viewed (0) -
docs/ru/docs/advanced/using-request-directly.md
Представим, что вы хотите получить IP-адрес/хост клиента внутри вашей *функции-обработчика пути*. Для этого нужно обратиться к запросу напрямую. {* ../../docs_src/using_request_directly/tutorial001_py39.py hl[1,7:8] *} Если объявить параметр *функции-обработчика пути* с типом `Request`, **FastAPI** поймёт, что нужно передать объект `Request` в этот параметр. /// tip | СоветRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.8K bytes - Viewed (0) -
tests/test_tutorial/test_additional_responses/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.additional_responses.tutorial003_py39 import app client = TestClient(app) def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"id": "foo", "value": "there goes my hero"} def test_path_operation_not_found(): response = client.get("/items/bar")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.6K bytes - Viewed (0) -
tests/test_tutorial/test_response_directly/test_tutorial001.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.response_directly.{request.param}")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 5.1K bytes - Viewed (0) -
docs/ru/docs/tutorial/handling-errors.md
Для возврата клиенту HTTP-ответов с ошибками используется `HTTPException`. ### Импортируйте `HTTPException` { #import-httpexception } {* ../../docs_src/handling_errors/tutorial001_py39.py hl[1] *} ### Вызовите `HTTPException` в своем коде { #raise-an-httpexception-in-your-code } `HTTPException` - это обычное исключение Python с дополнительными данными, актуальными для API.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/ru/docs/advanced/response-directly.md
Вы можете поместить ваш XML-контент в строку, поместить её в `Response` и вернуть: {* ../../docs_src/response_directly/tutorial002_py39.py hl[1,18] *} ## Примечания { #notes } Когда вы возвращаете объект `Response` напрямую, его данные не валидируются, не преобразуются (не сериализуются) и не документируются автоматически.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 5.1K bytes - Viewed (0) -
docs/pt/docs/advanced/response-change-status-code.md
E então você pode definir o `status_code` neste objeto de retorno temporal. {* ../../docs_src/response_change_status_code/tutorial001_py39.py hl[1,9,12] *} E então você pode retornar qualquer objeto que você precise, como você faria normalmente (um `dict`, um modelo de banco de dados, etc.).Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.7K bytes - Viewed (0) -
tests/test_tutorial/test_path_params_numeric_validations/test_tutorial001.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), pytest.param("tutorial001_an_py39"), pytest.param("tutorial001_an_py310", marks=needs_py310), ], )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 5.6K bytes - Viewed (0) -
tests/test_tutorial/test_separate_openapi_schemas/test_tutorial001.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial001_py39"), pytest.param("tutorial001_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest) -> TestClient: mod = importlib.import_module(f"docs_src.separate_openapi_schemas.{request.param}")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 5K bytes - Viewed (0) -
docs/pt/docs/tutorial/static-files.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.9K bytes - Viewed (0)