- Sort Score
- Result 10 results
- Languages All
Results 211 - 220 of 924 for docs_src (0.15 sec)
-
docs/pt/docs/tutorial/testing.md
Ambas as *operações de rotas* requerem um cabeçalho `X-Token`. {* ../../docs_src/app_testing/app_b_an_py310/main.py *} ### Arquivo de teste estendido { #extended-testing-file } Você pode então atualizar `test_main.py` com os testes estendidos: {* ../../docs_src/app_testing/app_b_an_py310/test_main.py *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 6.5K bytes - Viewed (0) -
docs/ru/docs/how-to/configure-swagger-ui.md
Без изменения настроек подсветка синтаксиса включена по умолчанию: <img src="/img/tutorial/extending-openapi/image02.png"> Но вы можете отключить её, установив `syntaxHighlight` в `False`: {* ../../docs_src/configure_swagger_ui/tutorial001_py39.py hl[3] *} …и после этого Swagger UI больше не будет показывать подсветку синтаксиса: <img src="/img/tutorial/extending-openapi/image03.png">
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.2K bytes - Viewed (0) -
docs/pt/docs/tutorial/query-params-str-validations.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 18.2K bytes - Viewed (0) -
docs/zh/docs/advanced/websockets.md
当然,这并不是最优的做法,您不应该在生产环境中使用它。 在生产环境中,您应该选择上述任一选项。 但这是一种专注于 WebSockets 的服务器端并提供一个工作示例的最简单方式: {* ../../docs_src/websockets/tutorial001.py hl[2,6:38,41:43] *} ## 创建 `websocket` 在您的 **FastAPI** 应用程序中,创建一个 `websocket`: {* ../../docs_src/websockets/tutorial001.py hl[1,46:47] *} /// note | 技术细节 您也可以使用 `from starlette.websockets import WebSocket`。Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 5.1K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial009b.py
from pathlib import Path from fastapi.testclient import TestClient from docs_src.custom_response import tutorial009b_py39 from docs_src.custom_response.tutorial009b_py39 import app client = TestClient(app) def test_get(tmp_path: Path): file_path: Path = tmp_path / "large-video-file.mp4" tutorial009b_py39.some_file_path = str(file_path) test_content = b"Fake video bytes" file_path.write_bytes(test_content)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 505 bytes - Viewed (0) -
docs/de/docs/tutorial/cookie-params.md
Importieren Sie zuerst `Cookie`: {* ../../docs_src/cookie_params/tutorial001_an_py310.py hl[3] *} ## `Cookie`-Parameter deklarieren { #declare-cookie-parameters } Deklarieren Sie dann die Cookie-Parameter mit derselben Struktur wie bei `Path` und `Query`. Sie können den Defaultwert sowie alle zusätzlichen Validierungen oder Annotierungsparameter definieren: {* ../../docs_src/cookie_params/tutorial001_an_py310.py hl[9] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Sep 24 08:10:28 UTC 2025 - 1.8K bytes - Viewed (0) -
docs/ko/docs/tutorial/cookie-params.md
쿠키 매개변수를 `Query`와 `Path` 매개변수들과 같은 방식으로 정의할 수 있습니다. ## `Cookie` 임포트 먼저 `Cookie`를 임포트합니다: {* ../../docs_src/cookie_params/tutorial001_an_py310.py hl[3] *} ## `Cookie` 매개변수 선언 그런 다음, `Path`와 `Query`처럼 동일한 구조를 사용하는 쿠키 매개변수를 선언합니다. 첫 번째 값은 기본값이며, 추가 검증이나 어노테이션 매개변수 모두 전달할 수 있습니다: {* ../../docs_src/cookie_params/tutorial001_an_py310.py hl[9] *} /// note | 기술 세부사항Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 1.2K bytes - Viewed (0) -
docs/zh/docs/tutorial/handling-errors.md
一般情况下可能不会需要在代码中直接使用响应头。 但对于某些高级应用场景,还是需要添加自定义响应头: {* ../../docs_src/handling_errors/tutorial002.py hl[14] *} ## 安装自定义异常处理器 添加自定义处理器,要使用 [Starlette 的异常工具](https://www.starlette.dev/exceptions/)。 假设要触发的自定义异常叫作 `UnicornException`。 且需要 FastAPI 实现全局处理该异常。 此时,可以用 `@app.exception_handler()` 添加自定义异常控制器: {* ../../docs_src/handling_errors/tutorial003.py hl[5:7,13:18,24] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 8.2K bytes - Viewed (0) -
docs/pt/docs/advanced/advanced-dependencies.md
Veja como poderia ser: {* ../../docs_src/dependencies/tutorial013_an_py310.py *} O código de saída, o fechamento automático da `Session` em: {* ../../docs_src/dependencies/tutorial013_an_py310.py ln[19:21] *} ...seria executado depois que a resposta terminar de enviar os dados lentos: {* ../../docs_src/dependencies/tutorial013_an_py310.py ln[30:38] hl[31:33] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 16 20:32:40 UTC 2025 - 10K bytes - Viewed (0) -
docs/pt/docs/tutorial/header-param-models.md
Declare os **parâmetros de cabeçalho** que você precisa em um **modelo do Pydantic**, e então declare o parâmetro como `Header`: {* ../../docs_src/header_param_models/tutorial001_an_py310.py hl[9:14,18] *} O **FastAPI** irá **extrair** os dados de **cada campo** a partir dos **cabeçalhos** da requisição e te retornará o modelo do Pydantic que você definiu.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Nov 12 16:23:57 UTC 2025 - 2.9K bytes - Viewed (0)