- Sort Score
- Result 10 results
- Languages All
Results 321 - 330 of 435 for tutorial008b_py39 (0.06 sec)
-
tests/test_tutorial/test_sub_applications/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.sub_applications.tutorial001_py39 import app client = TestClient(app) openapi_schema_main = { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/app": { "get": { "responses": { "200": { "description": "Successful Response",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.9K bytes - Viewed (0) -
tests/test_tutorial/test_using_request_directly/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.using_request_directly.tutorial001_py39 import app client = TestClient(app) def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200 assert response.json() == {"client_host": "testclient", "item_id": "foo"} def test_openapi(): response = client.get("/openapi.json") assert response.status_code == 200
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.8K bytes - Viewed (0) -
docs/en/docs/advanced/wsgi.md
## Using `WSGIMiddleware` { #using-wsgimiddleware } You need to import `WSGIMiddleware`. Then wrap the WSGI (e.g. Flask) app with the middleware. And then mount that under a path. {* ../../docs_src/wsgi/tutorial001_py39.py hl[2:3,3] *} ## Check it { #check-it } Now, every request under the path `/v1/` will be handled by the Flask application. And the rest will be handled by **FastAPI**.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.2K bytes - Viewed (0) -
tests/test_tutorial/test_debugging/test_tutorial001.py
import importlib import runpy import sys import unittest import pytest from fastapi.testclient import TestClient MOD_NAME = "docs_src.debugging.tutorial001_py39" @pytest.fixture(name="client") def get_client(): mod = importlib.import_module(MOD_NAME) client = TestClient(mod.app) return client def test_uvicorn_run_is_not_called_on_import(): if sys.modules.get(MOD_NAME):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 1.8K bytes - Viewed (0) -
tests/test_tutorial/test_additional_status_codes/test_tutorial001.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ "tutorial001_py39", pytest.param("tutorial001_py310", marks=needs_py310), "tutorial001_an_py39", pytest.param("tutorial001_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 993 bytes - Viewed (0) -
tests/test_tutorial/test_behind_a_proxy/test_tutorial003.py
from fastapi.testclient import TestClient from inline_snapshot import snapshot from docs_src.behind_a_proxy.tutorial003_py39 import app client = TestClient(app) def test_main(): response = client.get("/app") assert response.status_code == 200 assert response.json() == {"message": "Hello World", "root_path": "/api/v1"} def test_openapi_schema(): response = client.get("/openapi.json")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 1.5K bytes - Viewed (0) -
docs/ru/docs/advanced/wsgi.md
Нужно импортировать `WSGIMiddleware`. Затем оберните WSGI‑приложение (например, Flask) в middleware (Промежуточный слой). После этого смонтируйте его на путь. {* ../../docs_src/wsgi/tutorial001_py39.py hl[2:3,3] *} ## Проверьте { #check-it } Теперь каждый HTTP‑запрос по пути `/v1/` будет обрабатываться приложением Flask. А всё остальное будет обрабатываться **FastAPI**.
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.7K bytes - Viewed (0) -
docs/pt/docs/tutorial/response-status-code.md
Vamos ver o exemplo anterior novamente: {* ../../docs_src/response_status_code/tutorial001_py39.py hl[6] *} `201` é o código de status para "Criado". Mas você não precisa memorizar o que cada um desses códigos significa. Você pode usar as variáveis de conveniência de `fastapi.status`. {* ../../docs_src/response_status_code/tutorial002_py39.py hl[1,6] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.4K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001.py
import importlib from types import ModuleType import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="mod", params=[ "tutorial001_py39", pytest.param("tutorial001_py310", marks=needs_py310), "tutorial001_an_py39", pytest.param("tutorial001_an_py310", marks=needs_py310), ], ) def get_mod(request: pytest.FixtureRequest):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/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), ], ) def get_client(request: pytest.FixtureRequest):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 3.9K bytes - Viewed (0)