- Sort Score
- Result 10 results
- Languages All
Results 351 - 360 of 550 for tutorial008e_py39 (0.1 sec)
-
docs/es/docs/tutorial/middleware.md
* Luego devuelve la `response` generada por la correspondiente *path operation*. * Puedes entonces modificar aún más la `response` antes de devolverla. {* ../../docs_src/middleware/tutorial001_py39.py hl[8:9,11,14] *} /// tip | ConsejoRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.3K 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_configure_swagger_ui/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.configure_swagger_ui.tutorial001_py39 import app client = TestClient(app) def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text assert '"syntaxHighlight": false' in response.text, ( "syntaxHighlight should be included and converted to JSON" ) assert '"dom_id": "#swagger-ui"' in response.text, (
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.4K bytes - Viewed (0) -
tests/test_tutorial/test_sub_applications/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.sub_applications.tutorial001_py39 import app client = TestClient(app) openapi_schema_main = { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/app": { "get": { "responses": { "200": { "description": "Successful Response",
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1.9K bytes - Viewed (0) -
tests/test_tutorial/test_using_request_directly/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.using_request_directly.tutorial001_py39 import app client = TestClient(app) def test_path_operation(): response = client.get("/items/foo") assert response.status_code == 200 assert response.json() == {"client_host": "testclient", "item_id": "foo"} def test_openapi(): response = client.get("/openapi.json") assert response.status_code == 200
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 3.8K bytes - Viewed (0) -
tests/test_tutorial/test_background_tasks/test_tutorial001.py
import os from pathlib import Path from fastapi.testclient import TestClient from docs_src.background_tasks.tutorial001_py39 import app client = TestClient(app) def test(): log = Path("log.txt") if log.is_file(): os.remove(log) # pragma: no cover response = client.post("/send-notification/******@****.***") 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 - 583 bytes - Viewed (0) -
docs/zh/docs/advanced/generate-clients.md
如果您正在开发**前端**,一个非常有趣的替代方案是 <a href="https://github.com/hey-api/openapi-ts" class="external-link" target="_blank">openapi-ts</a>。 ## 生成一个 TypeScript 前端客户端 让我们从一个简单的 FastAPI 应用开始: {* ../../docs_src/generate_clients/tutorial001_py39.py hl[7:9,12:13,16:17,21] *} 请注意,*路径操作* 定义了他们所用于请求数据和回应数据的模型,所使用的模型是`Item` 和 `ResponseMessage`。 ### API 文档 如果您访问API文档,您将看到它具有在请求中发送和在响应中接收数据的**模式(schemas)**:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 8.5K bytes - Viewed (0) -
docs/es/docs/how-to/custom-docs-ui-assets.md
Para desactivarlos, establece sus URLs en `None` cuando crees tu aplicación de `FastAPI`: {* ../../docs_src/custom_docs_ui/tutorial001_py39.py hl[8] *} ### Incluye la documentación personalizada { #include-the-custom-docs } Ahora puedes crear las *path operations* para la documentación personalizada.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 8.6K bytes - Viewed (0) -
docs/pt/docs/how-to/custom-docs-ui-assets.md
O primeiro passo é desativar a documentação automática, pois por padrão, ela usa o CDN padrão. Para desativá-los, defina suas URLs como `None` ao criar sua aplicação FastAPI: {* ../../docs_src/custom_docs_ui/tutorial001_py39.py hl[8] *} ### Incluir a documentação personalizada { #include-the-custom-docs } Agora você pode criar as *operações de rota* para a documentação personalizada.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 8.8K bytes - Viewed (0)