- Sort Score
- Result 10 results
- Languages All
Results 511 - 520 of 616 for tutorial012_py39 (0.64 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_generate_clients/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.generate_clients.tutorial003_py39 import app client = TestClient(app) def test_post_items(): response = client.post("/items/", json={"name": "Foo", "price": 5}) assert response.status_code == 200, response.text assert response.json() == {"message": "Item received"} def test_post_users(): response = client.post(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 7.1K 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_query_params_str_validations/test_tutorial006.py
import importlib import pytest from fastapi.testclient import TestClient @pytest.fixture( name="client", params=[ pytest.param("tutorial006_py39"), pytest.param("tutorial006_an_py39"), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module( f"docs_src.query_params_str_validations.{request.param}" ) client = TestClient(mod.app) return client
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.4K 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/de/docs/advanced/response-directly.md
Sie könnten Ihren XML-Inhalt als String in eine `Response` einfügen und sie zurückgeben: {* ../../docs_src/response_directly/tutorial002_py39.py hl[1,18] *} ## Anmerkungen { #notes } Wenn Sie eine `Response` direkt zurücksenden, werden deren Daten weder validiert, konvertiert (serialisiert), noch automatisch dokumentiert.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.7K bytes - Viewed (0) -
docs/es/docs/advanced/response-directly.md
Podrías poner tu contenido XML en un string, poner eso en un `Response`, y devolverlo: {* ../../docs_src/response_directly/tutorial002_py39.py hl[1,18] *} ## Notas { #notes } Cuando devuelves una `Response` directamente, sus datos no son validados, convertidos (serializados), ni documentados automáticamente.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.4K 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)