- Sort Score
- Result 10 results
- Languages All
Results 1211 - 1220 of 2,000 for Fastapi (0.05 sec)
-
docs/zh/docs/python-types.md
/// 整个 **FastAPI** 建立在 Pydantic 的基础之上。 实际上你将在 [教程 - 用户指南](tutorial/index.md){.internal-link target=_blank} 看到很多这种情况。 ## **FastAPI** 中的类型提示 **FastAPI** 利用这些类型提示来做下面几件事。 使用 **FastAPI** 时用类型提示声明参数可以获得: * **编辑器支持**。 * **类型检查**。 ...并且 **FastAPI** 还会用这些类型声明来: * **定义参数要求**:声明对请求路径参数、查询参数、请求头、请求体、依赖等的要求。
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.6K bytes - Viewed (0) -
docs/ja/docs/tutorial/dependencies/classes-as-dependencies.md
以下にある最後の`CommonQueryParams`: ```Python ... = Depends(CommonQueryParams) ``` ...は、**FastAPI** が依存関係を知るために実際に使用するものです。 そこからFastAPIが宣言されたパラメータを抽出し、それが実際にFastAPIが呼び出すものです。 --- この場合、以下にある最初の`CommonQueryParams`: ```Python commons: CommonQueryParams ... ``` ...は **FastAPI** に対して特別な意味をもちません。FastAPIはデータ変換や検証などには使用しません(それらのためには`= Depends(CommonQueryParams)`を使用しています)。 実際には以下のように書けばいいだけです:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.2K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial003.py
from fastapi.testclient import TestClient from docs_src.path_operation_advanced_configuration.tutorial003 import app client = TestClient(app) def test_get(): response = client.get("/items/") assert response.status_code == 200, response.text assert response.json() == [{"item_id": "Foo"}] def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 575 bytes - Viewed (0) -
docs/em/docs/tutorial/response-status-code.md
👆 💪 ⚙️ 🏪 🔢 ⚪️➡️ `fastapi.status`. ```Python hl_lines="1 6" {!../../docs_src/response_status_code/tutorial002.py!} ``` 👫 🏪, 👫 🧑🤝🧑 🎏 🔢, ✋️ 👈 🌌 👆 💪 ⚙️ 👨🎨 📋 🔎 👫: <img src="/img/tutorial/response-status-code/image02.png"> /// note | "📡 ℹ" 👆 💪 ⚙️ `from starlette import status`. **FastAPI** 🚚 🎏 `starlette.status` `fastapi.status` 🏪 👆, 👩💻. ✋️ ⚫️ 👟 🔗 ⚪️➡️ 💃.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.4K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001.py
import pytest from dirty_equals import IsDict from fastapi import FastAPI from fastapi.testclient import TestClient @pytest.fixture(name="app") def get_app(): from docs_src.request_forms_and_files.tutorial001 import app return app @pytest.fixture(name="client") def get_client(app: FastAPI): client = TestClient(app) return client def test_post_form_no_body(client: TestClient):
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.8K bytes - Viewed (0) -
tests/test_tutorial/test_request_forms_and_files/test_tutorial001_an_py39.py
import pytest from dirty_equals import IsDict from fastapi import FastAPI from fastapi.testclient import TestClient from ...utils import needs_py39 @pytest.fixture(name="app") def get_app(): from docs_src.request_forms_and_files.tutorial001_an_py39 import app return app @pytest.fixture(name="client") def get_client(app: FastAPI): client = TestClient(app) return client @needs_py39
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 9.9K bytes - Viewed (0) -
docs/em/docs/advanced/templates.md
# 📄 👆 💪 ⚙️ 🙆 📄 🚒 👆 💚 ⏮️ **FastAPI**. ⚠ ⚒ Jinja2️⃣, 🎏 1️⃣ ⚙️ 🏺 & 🎏 🧰. 📤 🚙 🔗 ⚫️ 💪 👈 👆 💪 ⚙️ 🔗 👆 **FastAPI** 🈸 (🚚 💃). ## ❎ 🔗 ❎ `jinja2`: <div class="termy"> ```console $ pip install jinja2 ---> 100% ``` </div> ## ⚙️ `Jinja2Templates` * 🗄 `Jinja2Templates`. * ✍ `templates` 🎚 👈 👆 💪 🏤-⚙️ ⏪. * 📣 `Request` 🔢 *➡ 🛠️* 👈 🔜 📨 📄.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.1K bytes - Viewed (0) -
docs/em/docs/advanced/using-request-directly.md
# ⚙️ 📨 🔗 🆙 🔜, 👆 ✔️ 📣 🍕 📨 👈 👆 💪 ⏮️ 👫 🆎. ✊ 📊 ⚪️➡️: * ➡ 🔢. * 🎚. * 🍪. * ♒️. & 🔨, **FastAPI** ⚖ 👈 💽, 🏭 ⚫️ & 🏭 🧾 👆 🛠️ 🔁. ✋️ 📤 ⚠ 🌐❔ 👆 💪 💪 🔐 `Request` 🎚 🔗. ## ℹ 🔃 `Request` 🎚 **FastAPI** 🤙 **💃** 🔘, ⏮️ 🧽 📚 🧰 🔛 🔝, 👆 💪 ⚙️ 💃 <a href="https://www.starlette.io/requests/" class="external-link" target="_blank">`Request`</a> 🎚 🔗 🕐❔ 👆 💪.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.8K bytes - Viewed (0) -
tests/test_response_model_sub_types.py
from typing import List from fastapi import FastAPI from fastapi.testclient import TestClient from pydantic import BaseModel class Model(BaseModel): name: str app = FastAPI() @app.get("/valid1", responses={"500": {"model": int}}) def valid1(): pass @app.get("/valid2", responses={"500": {"model": List[int]}}) def valid2(): pass @app.get("/valid3", responses={"500": {"model": Model}})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 5.3K bytes - Viewed (0) -
tests/test_tutorial/test_body_nested_models/test_tutorial009.py
import pytest from dirty_equals import IsDict from fastapi.testclient import TestClient @pytest.fixture(name="client") def get_client(): from docs_src.body_nested_models.tutorial009 import app client = TestClient(app) return client def test_post_body(client: TestClient): data = {"2": 2.2, "3": 3.3} response = client.post("/index-weights/", json=data) assert response.status_code == 200, response.text
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 4.2K bytes - Viewed (0)