- Sort Score
- Result 10 results
- Languages All
Results 441 - 450 of 871 for tutorial001 (0.28 sec)
-
tests/test_tutorial/test_schema_extra_example/test_tutorial001.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_pydanticv2 @pytest.fixture(name="client") def get_client(): from docs_src.schema_extra_example.tutorial001 import app client = TestClient(app) return client @needs_pydanticv2 def test_post_body_example(client: TestClient): response = client.put( "/items/5", json={ "name": "Foo",
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.7K bytes - Viewed (0) -
docs/de/docs/advanced/response-change-status-code.md
Anschließend können Sie den `status_code` in diesem *vorübergehenden* Response-Objekt festlegen. ```Python hl_lines="1 9 12" {!../../docs_src/response_change_status_code/tutorial001.py!} ``` Und dann können Sie wie gewohnt jedes benötigte Objekt zurückgeben (ein `dict`, ein Datenbankmodell usw.).
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 1.8K bytes - Viewed (0) -
docs/ko/docs/tutorial/dependencies/index.md
``` //// //// tab | Python 3.8+ Annotated가 없는 경우 /// tip | "팁" 가능하다면 `Annotated`가 달린 버전을 권장합니다. /// ```Python hl_lines="8-11" {!> ../../docs_src/dependencies/tutorial001.py!} ``` //// 이게 다입니다. **단 두 줄입니다**. 그리고, 이 함수는 여러분의 모든 *경로 작동 함수*가 가지고 있는 것과 같은 형태와 구조를 가지고 있습니다. 여러분은 이를 "데코레이터"가 없는 (`@app.get("/some-path")`가 없는) *경로 작동 함수*라고 생각할 수 있습니다.
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 13.5K bytes - Viewed (0) -
docs/en/docs/advanced/testing-dependencies.md
``` //// //// tab | Python 3.8+ non-Annotated /// tip Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="28-29 32" {!> ../../docs_src/dependency_testing/tutorial001.py!} ``` //// /// tip You can set a dependency override for a dependency used anywhere in your **FastAPI** application.
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.9K bytes - Viewed (0) -
docs/em/docs/advanced/additional-responses.md
**FastAPI** 🔜 ✊ 👈 🏷, 🏗 🚮 🎻 🔗 & 🔌 ⚫️ ☑ 🥉 🗄. 🖼, 📣 ➕1️⃣ 📨 ⏮️ 👔 📟 `404` & Pydantic 🏷 `Message`, 👆 💪 ✍: ```Python hl_lines="18 22" {!../../docs_src/additional_responses/tutorial001.py!} ``` /// note ✔️ 🤯 👈 👆 ✔️ 📨 `JSONResponse` 🔗. /// /// info `model` 🔑 🚫 🍕 🗄. **FastAPI** 🔜 ✊ Pydantic 🏷 ⚪️➡️ 📤, 🏗 `JSON Schema`, & 🚮 ⚫️ ☑ 🥉. ☑ 🥉:
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.8K bytes - Viewed (0) -
docs/em/docs/advanced/response-directly.md
📚 💼, 👆 💪 ⚙️ `jsonable_encoder` 🗜 👆 📊 ⏭ 🚶♀️ ⚫️ 📨: ```Python hl_lines="6-7 21-22" {!../../docs_src/response_directly/tutorial001.py!} ``` /// note | "📡 ℹ" 👆 💪 ⚙️ `from starlette.responses import JSONResponse`. **FastAPI** 🚚 🎏 `starlette.responses` `fastapi.responses` 🏪 👆, 👩💻. ✋️ 🌅 💪 📨 👟 🔗 ⚪️➡️ 💃. ///
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.6K bytes - Viewed (0) -
docs/zh/docs/advanced/response-directly.md
例如,如果不首先将 Pydantic 模型转换为 `dict`,并将所有数据类型(如 `datetime`、`UUID` 等)转换为兼容 JSON 的类型,则不能将其放入JSONResponse中。 对于这些情况,在将数据传递给响应之前,你可以使用 `jsonable_encoder` 来转换你的数据。 ```Python hl_lines="4 6 20 21" {!../../docs_src/response_directly/tutorial001.py!} ``` /// note | "技术细节" 你也可以使用 `from starlette.responses import JSONResponse`。 出于方便,**FastAPI** 会提供与 `starlette.responses` 相同的 `fastapi.responses` 给开发者。但是大多数可用的响应都直接来自 Starlette。 ///
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.1K bytes - Viewed (0) -
docs/es/docs/how-to/graphql.md
Aquí hay una pequeña muestra de cómo podrías integrar Strawberry con FastAPI: ```Python hl_lines="3 22 25-26" {!../../docs_src/graphql/tutorial001.py!} ``` Puedes aprender más sobre Strawberry en la <a href="https://strawberry.rocks/" class="external-link" target="_blank">documentación de Strawberry</a>.
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.5K bytes - Viewed (0) -
docs/ja/docs/tutorial/static-files.md
# 静的ファイル `StaticFiles` を使用して、ディレクトリから静的ファイルを自動的に提供できます。 ## `StaticFiles` の使用 * `StaticFiles` をインポート。 * `StaticFiles()` インスタンスを生成し、特定のパスに「マウント」。 ```Python hl_lines="2 6" {!../../docs_src/static_files/tutorial001.py!} ``` /// note | "技術詳細" `from starlette.staticfiles import StaticFiles` も使用できます。 **FastAPI**は、開発者の利便性のために、`starlette.staticfiles` と同じ `fastapi.staticfiles` を提供します。しかし、実際にはStarletteから直接渡されています。 ///
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.1K bytes - Viewed (0) -
docs/ko/docs/tutorial/debugging.md
# 디버깅 예를 들면 Visual Studio Code 또는 PyCharm을 사용하여 편집기에서 디버거를 연결할 수 있습니다. ## `uvicorn` 호출 FastAPI 애플리케이션에서 `uvicorn`을 직접 임포트하여 실행합니다 ```Python hl_lines="1 15" {!../../docs_src/debugging/tutorial001.py!} ``` ### `__name__ == "__main__"` 에 대하여 `__name__ == "__main__"`의 주요 목적은 다음과 같이 파일이 호출될 때 실행되는 일부 코드를 갖는 것입니다. <div class="termy"> ```console $ python myapp.py ``` </div>
Registered: Sun Oct 27 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 2.8K bytes - Viewed (0)