- Sort Score
- Result 10 results
- Languages All
Results 401 - 410 of 550 for tutorial008c_py39 (0.57 sec)
-
docs/ru/docs/tutorial/static-files.md
## Использование `StaticFiles` { #use-staticfiles } * Импортируйте `StaticFiles`. * "Примонтируйте" экземпляр `StaticFiles()` к определённому пути. {* ../../docs_src/static_files/tutorial001_py39.py hl[2,6] *} /// note | Технические детали Вы также можете использовать `from starlette.staticfiles import StaticFiles`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.1K bytes - Viewed (0) -
tests/test_tutorial/test_events/test_tutorial001.py
import pytest from fastapi import FastAPI from fastapi.testclient import TestClient @pytest.fixture(name="app", scope="module") def get_app(): with pytest.warns(DeprecationWarning): from docs_src.events.tutorial001_py39 import app yield app def test_events(app: FastAPI): with TestClient(app) as client: response = client.get("/items/foo") 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 - 3.6K bytes - Viewed (0) -
docs/ru/docs/how-to/conditional-openapi.md
Вы можете легко использовать те же настройки Pydantic, чтобы настроить сгенерированный OpenAPI и интерфейсы документации. Например: {* ../../docs_src/conditional_openapi/tutorial001_py39.py hl[6,11] *} Здесь мы объявляем настройку `openapi_url` с тем же значением по умолчанию — `"/openapi.json"`. Затем используем её при создании приложения FastAPI.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial003.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial003_py39"), pytest.param("tutorial003_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body.{request.param}") client = TestClient(mod.app)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 5.5K bytes - Viewed (0) -
tests/test_tutorial/test_generate_clients/test_tutorial002.py
from fastapi.testclient import TestClient from docs_src.generate_clients.tutorial002_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: Fri Dec 26 10:43:02 UTC 2025 - 7.1K bytes - Viewed (0) -
tests/test_tutorial/test_handling_errors/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.handling_errors.tutorial001_py39 import app client = TestClient(app) def test_get_item(): response = client.get("/items/foo") assert response.status_code == 200, response.text assert response.json() == {"item": "The Foo Wrestlers"} def test_get_item_not_found(): response = client.get("/items/bar") assert response.status_code == 404, response.text
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.2K bytes - Viewed (0) -
tests/test_tutorial/test_security/test_tutorial002.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial002_py39"), pytest.param("tutorial002_py310", marks=needs_py310), pytest.param("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: Fri Dec 26 10:43:02 UTC 2025 - 2.2K bytes - Viewed (0) -
docs/ru/docs/advanced/response-change-status-code.md
И затем вы можете установить `status_code` в этом *временном* объекте ответа. {* ../../docs_src/response_change_status_code/tutorial001_py39.py hl[1,9,12] *} После этого вы можете вернуть любой объект, который вам нужен, как обычно (`dict`, модель базы данных и т.д.).Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 2.7K bytes - Viewed (0) -
tests/test_tutorial/test_query_params_str_validations/test_tutorial008.py
import importlib import pytest from fastapi.testclient import TestClient from ...utils import needs_py310 @pytest.fixture( name="client", params=[ pytest.param("tutorial008_py39"), pytest.param("tutorial008_py310", marks=needs_py310), pytest.param("tutorial008_an_py39"), pytest.param("tutorial008_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 4.9K 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)