- Sort Score
- Result 10 results
- Languages All
Results 691 - 700 of 924 for docs_src (0.34 sec)
-
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial007.py
@pytest.fixture( name="client", params=[ pytest.param("tutorial007_py39"), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module( f"docs_src.path_operation_advanced_configuration.{request.param}" ) client = TestClient(mod.app) return client def test_post(client: TestClient): yaml_data = """ name: Deadpoolio
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 3.4K bytes - Viewed (0) -
docs/es/docs/advanced/response-change-status-code.md
Puedes declarar un parámetro de tipo `Response` en tu *path operation function* (como puedes hacer para cookies y headers). Y luego puedes establecer el `status_code` en ese objeto de response *temporal*. {* ../../docs_src/response_change_status_code/tutorial001_py39.py hl[1,9,12] *} Y luego puedes devolver cualquier objeto que necesites, como lo harías normalmente (un `dict`, un modelo de base de datos, 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_header_params/test_tutorial003.py
pytest.param("tutorial003_an_py39"), pytest.param("tutorial003_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.header_params.{request.param}") client = TestClient(mod.app) return client @pytest.mark.parametrize( "path,headers,expected_status,expected_response", [
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_openapi_webhooks/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.openapi_webhooks.tutorial001_py39 import app client = TestClient(app) def test_get(): response = client.get("/users/") assert response.status_code == 200, response.text assert response.json() == ["Rick", "Morty"] def test_dummy_webhook(): # Just for coverage app.webhooks.routes[0].endpoint({}) def test_openapi_schema():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.4K bytes - Viewed (0) -
docs/ja/docs/tutorial/cookie-param-models.md
/// /// tip | 豆知識 これと同じテクニックは `Query` 、 `Cookie` 、 `Header` にも適用できます。 😎 /// ## クッキーにPydanticモデルを使用する 必要な複数の**クッキー**パラメータを**Pydanticモデル**で宣言し、さらに、それを `Cookie` として宣言しましょう: {* ../../docs_src/cookie_param_models/tutorial001_an_py310.py hl[9:12,16] *} **FastAPI**は、リクエストの**クッキー**から**それぞれのフィールド**のデータを**抽出**し、定義された**Pydanticモデル**を提供します。 ## ドキュメントの確認 対話的APIドキュメントUI `/docs` で、定義されているクッキーを確認できます:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Feb 28 14:21:27 UTC 2025 - 4.5K bytes - Viewed (0) -
docs/ja/docs/advanced/response-directly.md
例えば、Pydanticモデルを `JSONResponse` に含めるには、すべてのデータ型 (`datetime` や `UUID` など) をJSON互換の型に変換された `dict` に変換しなければなりません。 このようなケースでは、レスポンスにデータを含める前に `jsonable_encoder` を使ってデータを変換できます。 {* ../../docs_src/response_directly/tutorial001.py hl[6:7,21:22] *} /// note | 技術詳細 また、`from starlette.responses import JSONResponse` も利用できます。Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 3.6K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial003.py
pytest.param("tutorial003_an_py39"), pytest.param("tutorial003_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.schema_extra_example.{request.param}") client = TestClient(mod.app) return client def test_post_body_example(client: TestClient): response = client.put( "/items/5", json={
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 5.1K bytes - Viewed (0) -
docs/es/docs/tutorial/encoder.md
Puedes usar `jsonable_encoder` para eso. Recibe un objeto, como un modelo de Pydantic, y devuelve una versión compatible con JSON: {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *} En este ejemplo, convertiría el modelo de Pydantic a un `dict`, y el `datetime` a un `str`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 16:33:45 UTC 2025 - 1.8K bytes - Viewed (0) -
docs/de/docs/tutorial/encoder.md
Sie können für diese Fälle `jsonable_encoder` verwenden. Es nimmt ein Objekt entgegen, wie etwa ein Pydantic-Modell, und gibt eine JSON-kompatible Version zurück: {* ../../docs_src/encoder/tutorial001_py310.py hl[4,21] *} In diesem Beispiel wird das Pydantic-Modell in ein `dict`, und das `datetime`-Objekt in ein `str` konvertiert.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Sep 20 15:10:09 UTC 2025 - 1.8K bytes - Viewed (0) -
tests/test_tutorial/test_response_model/test_tutorial004.py
params=[ pytest.param("tutorial004_py39"), pytest.param("tutorial004_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.response_model.{request.param}") client = TestClient(mod.app) return client @pytest.mark.parametrize( "url,data", [ ("/items/foo", {"name": "Foo", "price": 50.2}), (Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 5.3K bytes - Viewed (0)