- Sort Score
- Result 10 results
- Languages All
Results 761 - 770 of 924 for docs_src (0.04 sec)
-
tests/test_tutorial/test_schema_extra_example/test_tutorial004.py
pytest.param("tutorial004_an_py39"), pytest.param("tutorial004_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: Sat Dec 27 18:19:10 UTC 2025 - 5.4K bytes - Viewed (0) -
tests/test_tutorial/test_dataclasses/test_tutorial001.py
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.dataclasses_.{request.param}") client = TestClient(mod.app) client.headers.clear() return client def test_post_item(client: TestClient):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 4.6K bytes - Viewed (0) -
docs/ko/docs/advanced/response-directly.md
예를 들어, Pydantic 모델을 `dict`로 변환해 `JSONResponse`에 넣지 않으면 JSON 호환 유형으로 변환된 데이터 유형(예: `datetime`, `UUID` 등)이 사용되지 않습니다. 이러한 경우, 데이터를 응답에 전달하기 전에 `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.4K bytes - Viewed (0) -
docs/en/docs/tutorial/middleware.md
* Then it returns the `response` generated by the corresponding *path operation*. * You can then further modify the `response` before returning it. {* ../../docs_src/middleware/tutorial001_py39.py hl[8:9,11,14] *} /// tipRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.1K bytes - Viewed (0) -
docs/zh/docs/advanced/response-directly.md
例如,如果不首先将 Pydantic 模型转换为 `dict`,并将所有数据类型(如 `datetime`、`UUID` 等)转换为兼容 JSON 的类型,则不能将其放入JSONResponse中。 对于这些情况,在将数据传递给响应之前,你可以使用 `jsonable_encoder` 来转换你的数据。 {* ../../docs_src/response_directly/tutorial001.py hl[4,6,20,21] *} /// 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 - 3K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial002_tutorial003_tutorial004.py
], ) def get_mod_name(request: pytest.FixtureRequest) -> str: return request.param @pytest.fixture(name="client") def get_client(mod_name: str) -> TestClient: mod = importlib.import_module(f"docs_src.custom_response.{mod_name}") return TestClient(mod.app) html_contents = """ <html> <head> <title>Some HTML in here</title> </head> <body>
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 1.8K bytes - Viewed (0) -
docs/ru/docs/tutorial/debugging.md
Вы можете подключить отладчик в своем редакторе, например, в Visual Studio Code или PyCharm. ## Вызов `uvicorn` { #call-uvicorn } В вашем FastAPI приложении, импортируйте и вызовите `uvicorn` напрямую: {* ../../docs_src/debugging/tutorial001_py39.py hl[1,15] *} ### Описание `__name__ == "__main__"` { #about-name-main } Главная цель использования `__name__ == "__main__"` в том, чтобы код выполнялся при запуске файла с помощью: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) -
docs/es/docs/how-to/conditional-openapi.md
Puedes usar fácilmente las mismas configuraciones de Pydantic para configurar tu OpenAPI generado y las interfaces de usuario de la documentación. Por ejemplo: {* ../../docs_src/conditional_openapi/tutorial001_py39.py hl[6,11] *} Aquí declaramos la configuración `openapi_url` con el mismo valor por defecto de `"/openapi.json"`. Y luego la usamos al crear la app de `FastAPI`.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 2.6K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial001.py
"tutorial001_an_py39", pytest.param("tutorial001_an_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body_multiple_params.{request.param}") client = TestClient(mod.app) return client def test_post_body_q_bar_content(client: TestClient):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 6.3K bytes - Viewed (0)