- Sort Score
- Result 10 results
- Languages All
Results 1641 - 1650 of 2,000 for Fastapi (0.06 sec)
-
docs/pt/docs/tutorial/query-param-models.md
Isso permitiria que você **reutilizasse o modelo** em **diversos lugares**, e também declarasse validações e metadados de todos os parâmetros de uma única vez. 😎 /// note | Nota Isso é suportado desde o FastAPI versão `0.115.0`. 🤓 /// ## Parâmetros de Consulta com um Modelo Pydantic Declare os **parâmetros de consulta** que você precisa em um **modelo Pydantic**, e então declare o parâmetro como `Query`:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Oct 15 09:53:14 UTC 2024 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py
from fastapi.testclient import TestClient from docs_src.path_operation_advanced_configuration.tutorial004 import app from ...utils import needs_pydanticv1, needs_pydanticv2 client = TestClient(app) def test_query_params_str_validations(): response = client.post("/items/", json={"name": "Foo", "price": 42}) assert response.status_code == 200, response.text assert response.json() == { "name": "Foo", "price": 42,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 28 04:14:40 UTC 2023 - 8.7K bytes - Viewed (0) -
docs/zh/docs/tutorial/header-params.md
/// ```Python hl_lines="9" {!> ../../docs_src/header_params/tutorial001.py!} ``` //// /// note | "技术细节" `Header` 是 `Path`、`Query`、`Cookie` 的**兄弟类**,都继承自共用的 `Param` 类。 注意,从 `fastapi` 导入的 `Query`、`Path`、`Header` 等对象,实际上是返回特殊类的函数。 /// /// info | "说明" 必须使用 `Header` 声明 header 参数,否则该参数会被解释为查询参数。 /// ## 自动转换 `Header` 比 `Path`、`Query` 和 `Cookie` 提供了更多功能。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.2K 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 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 Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Jul 09 18:06:12 UTC 2020 - 578 bytes - Viewed (0) -
docs/de/docs/how-to/index.md
Wenn etwas für Ihr Projekt interessant und nützlich erscheint, lesen Sie es, andernfalls überspringen Sie es einfach. /// tip | "Tipp" Wenn Sie strukturiert **FastAPI lernen** möchten (empfohlen), lesen Sie stattdessen Kapitel für Kapitel das [Tutorial – Benutzerhandbuch](../tutorial/index.md){.internal-link target=_blank}.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Aug 06 04:48:30 UTC 2024 - 636 bytes - Viewed (0) -
docs/em/docs/tutorial/header-params.md
``` //// /// note | "📡 ℹ" `Header` "👭" 🎓 `Path`, `Query` & `Cookie`. ⚫️ 😖 ⚪️➡️ 🎏 ⚠ `Param` 🎓. ✋️ 💭 👈 🕐❔ 👆 🗄 `Query`, `Path`, `Header`, & 🎏 ⚪️➡️ `fastapi`, 👈 🤙 🔢 👈 📨 🎁 🎓. /// /// info 📣 🎚, 👆 💪 ⚙️ `Header`, ↩️ ⏪ 🔢 🔜 🔬 🔢 🔢. /// ## 🏧 🛠️ `Header` ✔️ 🐥 ➕ 🛠️ 🔛 🔝 ⚫️❔ `Path`, `Query` & `Cookie` 🚚.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.2K bytes - Viewed (0) -
tests/test_tutorial/test_request_form_models/test_tutorial001_an.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.request_form_models.tutorial001_an import app client = TestClient(app) return client def test_post_body_form(client: TestClient): response = client.post("/login/", data={"username": "Foo", "password": "secret"}) assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 05 15:16:50 UTC 2024 - 7.4K bytes - Viewed (0) -
tests/test_tutorial/test_header_param_models/test_tutorial001.py
import importlib import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from inline_snapshot import snapshot from tests.utils import needs_py39, needs_py310 @pytest.fixture( name="client", params=[ "tutorial001", pytest.param("tutorial001_py39", marks=needs_py39), pytest.param("tutorial001_py310", marks=needs_py310), "tutorial001_an",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 8.7K bytes - Viewed (0) -
tests/test_tutorial/test_openapi_callbacks/test_tutorial001.py
from dirty_equals import IsDict from fastapi.testclient import TestClient from docs_src.openapi_callbacks.tutorial001 import app, invoice_notification client = TestClient(app) def test_get(): response = client.post( "/invoices/", json={"id": "fooinvoice", "customer": "John", "total": 5.3} ) assert response.status_code == 200, response.text assert response.json() == {"msg": "Invoice received"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 9K bytes - Viewed (0) -
tests/test_tutorial/test_body_multiple_params/test_tutorial001_an_py39.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="client") def get_client(): from docs_src.body_multiple_params.tutorial001_an_py39 import app client = TestClient(app) return client @needs_py39 def test_post_body_q_bar_content(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 7.6K bytes - Viewed (0)