- Sort Score
- Result 10 results
- Languages All
Results 451 - 460 of 623 for tutorial010_py39 (0.28 sec)
-
tests/test_tutorial/test_behind_a_proxy/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.behind_a_proxy.tutorial002_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(): response = client.get("/openapi.json") assert response.status_code == 200 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/de/docs/tutorial/static-files.md
## `StaticFiles` verwenden { #use-staticfiles } * Importieren Sie `StaticFiles`. * „Mounten“ Sie eine `StaticFiles()`-Instanz in einem bestimmten Pfad. {* ../../docs_src/static_files/tutorial001_py39.py hl[2,6] *} /// note | Technische Details Sie könnten auch `from starlette.staticfiles import StaticFiles` verwenden.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 2K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.path_operation_advanced_configuration.tutorial002_py39 import app client = TestClient(app) def test_get(): 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
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1K bytes - Viewed (0) -
tests/test_tutorial/test_dataclasses/test_tutorial002.py
import pytest from fastapi.testclient import TestClient from inline_snapshot import snapshot from tests.utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.dataclasses_.{request.param}")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 2.9K bytes - Viewed (0) -
tests/test_tutorial/test_events/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.events.tutorial003_py39 import ( app, fake_answer_to_everything_ml_model, ml_models, ) def test_events(): assert not ml_models, "ml_models should be empty" with TestClient(app) as client: assert ml_models["answer_to_everything"] == fake_answer_to_everything_ml_model response = client.get("/predict", params={"x": 2})
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.6K bytes - Viewed (0) -
tests/test_tutorial/test_extra_models/test_tutorial005.py
import importlib import pytest from fastapi.testclient import TestClient @pytest.fixture( name="client", params=[ pytest.param("tutorial005_py39"), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.extra_models.{request.param}") client = TestClient(mod.app) return client def test_get_items(client: TestClient):
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_background_tasks/test_tutorial002.py
import importlib import os from pathlib import Path import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ "tutorial002_py39", pytest.param("tutorial002_py310", marks=needs_py310), "tutorial002_an_py39", pytest.param("tutorial002_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 - 996 bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/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.schema_extra_example.{request.param}")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 4.8K bytes - Viewed (0) -
docs/ru/docs/tutorial/debugging.md
## Вызов `uvicorn` { #call-uvicorn } В вашем FastAPI приложении, импортируйте и вызовите `uvicorn` напрямую: {* ../../docs_src/debugging/tutorial001_py39.py hl[1,15] *} ### Описание `__name__ == "__main__"` { #about-name-main } Главная цель использования `__name__ == "__main__"` в том, чтобы код выполнялся при запуске файла с помощью: <div class="termy">Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.9K bytes - Viewed (0) -
docs/es/docs/advanced/using-request-directly.md
Imaginemos que quieres obtener la dirección IP/host del cliente dentro de tu *path operation function*. Para eso necesitas acceder al request directamente. {* ../../docs_src/using_request_directly/tutorial001_py39.py hl[1,7:8] *} Al declarar un parámetro de *path operation function* con el tipo siendo `Request`, **FastAPI** sabrá pasar el `Request` en ese parámetro. /// tip | ConsejoRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 2.5K bytes - Viewed (0)