- Sort Score
- Result 10 results
- Languages All
Results 231 - 240 of 877 for tutorial002 (0.21 sec)
-
docs/em/docs/advanced/additional-responses.md
🖼, 👆 💪 🚮 🌖 📻 🆎 `image/png`, 📣 👈 👆 *➡ 🛠️* 💪 📨 🎻 🎚 (⏮️ 📻 🆎 `application/json`) ⚖️ 🇩🇴 🖼: ```Python hl_lines="19-24 28" {!../../docs_src/additional_responses/tutorial002.py!} ``` /// note 👀 👈 👆 ✔️ 📨 🖼 ⚙️ `FileResponse` 🔗. /// /// info 🚥 👆 ✔ 🎏 📻 🆎 🎯 👆 `responses` 🔢, FastAPI 🔜 🤔 📨 ✔️ 🎏 📻 🆎 👑 📨 🎓 (🔢 `application/json`).
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 7.8K bytes - Viewed (0) -
docs/de/docs/advanced/dataclasses.md
/// ## Datenklassen als `response_model` Sie können `dataclasses` auch im Parameter `response_model` verwenden: ```Python hl_lines="1 7-13 19" {!../../docs_src/dataclasses/tutorial002.py!} ``` Die Datenklasse wird automatisch in eine Pydantic-Datenklasse konvertiert. Auf diese Weise wird deren Schema in der Benutzeroberfläche der API-Dokumentation angezeigt:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 4.6K bytes - Viewed (0) -
docs/en/docs/advanced/dataclasses.md
/// ## Dataclasses in `response_model` You can also use `dataclasses` in the `response_model` parameter: {* ../../docs_src/dataclasses/tutorial002.py hl[1,7:13,19] *} The dataclass will be automatically converted to a Pydantic dataclass. This way, its schema will show up in the API docs user interface: <img src="/img/tutorial/dataclasses/image01.png">
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 10:35:06 UTC 2024 - 4K bytes - Viewed (0) -
docs/em/docs/tutorial/response-status-code.md
/// ## ⌨ 💭 📛 ➡️ 👀 ⏮️ 🖼 🔄: ```Python hl_lines="6" {!../../docs_src/response_status_code/tutorial001.py!} ``` `201` 👔 📟 "✍". ✋️ 👆 🚫 ✔️ ✍ ⚫️❔ 🔠 👉 📟 ⛓. 👆 💪 ⚙️ 🏪 🔢 ⚪️➡️ `fastapi.status`. ```Python hl_lines="1 6" {!../../docs_src/response_status_code/tutorial002.py!} ``` 👫 🏪, 👫 🧑🤝🧑 🎏 🔢, ✋️ 👈 🌌 👆 💪 ⚙️ 👨🎨 📋 🔎 👫:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.4K bytes - Viewed (0) -
docs/en/docs/tutorial/header-param-models.md
``` //// //// tab | Python 3.8+ non-Annotated /// tip Prefer to use the `Annotated` version if possible. /// ```Python hl_lines="10" {!> ../../docs_src/header_param_models/tutorial002.py!} ``` //// If a client tries to send some **extra headers**, they will receive an **error** response.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 3.5K bytes - Viewed (0) -
docs/pt/docs/advanced/events.md
### Evento `shutdown` Para adicionar uma função que deve ser executada quando a aplicação estiver encerrando, declare ela com o evento `"shutdown"`: ```Python hl_lines="6" {!../../docs_src/events/tutorial002.py!} ``` Aqui, a função de manipulação de evento `shutdown` irá escrever uma linha de texto `"Application shutdown"` no arquivo `log.txt`. /// info | "Informação"
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/en/docs/advanced/events.md
### `shutdown` event To add a function that should be run when the application is shutting down, declare it with the event `"shutdown"`: {* ../../docs_src/events/tutorial002.py hl[6] *} Here, the `shutdown` event handler function will write a text line `"Application shutdown"` to a file `log.txt`. /// info
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 10:36:22 UTC 2024 - 7.6K bytes - Viewed (0) -
docs/zh/docs/tutorial/background-tasks.md
{!../../docs_src/background_tasks/tutorial001.py!} ``` **FastAPI** 会创建一个 `BackgroundTasks` 类型的对象并作为该参数传入。 ## 创建一个任务函数 创建要作为后台任务运行的函数。 它只是一个可以接收参数的标准函数。 它可以是 `async def` 或普通的 `def` 函数,**FastAPI** 知道如何正确处理。 在这种情况下,任务函数将写入一个文件(模拟发送电子邮件)。 由于写操作不使用 `async` 和 `await`,我们用普通的 `def` 定义函数: ```Python hl_lines="6-9" {!../../docs_src/background_tasks/tutorial001.py!} ``` ## 添加后台任务
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5K bytes - Viewed (0) -
tests/test_tutorial/test_header_param_models/test_tutorial002.py
from inline_snapshot import snapshot from tests.utils import needs_py39, needs_py310, needs_pydanticv1, needs_pydanticv2 @pytest.fixture( name="client", params=[ pytest.param("tutorial002", marks=needs_pydanticv2), pytest.param("tutorial002_py310", marks=[needs_py310, needs_pydanticv2]), pytest.param("tutorial002_an", marks=needs_pydanticv2),
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Sep 17 18:54:10 UTC 2024 - 9.5K bytes - Viewed (0) -
docs/ko/docs/tutorial/path-params.md
열거형 `ModelName`의 *열거형 멤버*를 비교할 수 있습니다: ```Python hl_lines="17" {!../../docs_src/path_params/tutorial005.py!} ``` #### *열거형 값* 가져오기 `model_name.value` 또는 일반적으로 `your_enum_member.value`를 이용하여 실제 값(위 예시의 경우 `str`)을 가져올 수 있습니다: ```Python hl_lines="20" {!../../docs_src/path_params/tutorial005.py!} ``` /// tip | "팁" `ModelName.lenet.value`로도 값 `"lenet"`에 접근할 수 있습니다. ///
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.8K bytes - Viewed (0)