- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 199 for tutorial003 (0.05 sec)
-
docs/zh/docs/advanced/events.md
首先要注意的是,我们定义了一个带有 `yield` 的异步函数。这与带有 `yield` 的依赖项非常相似。 ```Python hl_lines="14-19" {!../../docs_src/events/tutorial003.py!} ``` 这个函数在 `yield`之前的部分,会在应用启动前执行。 剩下的部分在 `yield` 之后,会在应用完成后执行。 ## 异步上下文管理器 如你所见,这个函数有一个装饰器 `@asynccontextmanager` 。 它将函数转化为所谓的“**异步上下文管理器**”。 ```Python hl_lines="1 13" {!../../docs_src/events/tutorial003.py!} ``` 在 Python 中, **上下文管理器**是一个你可以在 `with` 语句中使用的东西,例如,`open()` 可以作为上下文管理器使用。Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 7K bytes - Viewed (0) -
docs/ko/docs/tutorial/path-operation-configuration.md
{* ../../docs_src/path_operation_configuration/tutorial002.py hl[17,22,27] *} 전달된 태그들은 OpenAPI의 스키마에 추가되며, 자동 문서 인터페이스에서 사용됩니다: <img src="/img/tutorial/path-operation-configuration/image01.png"> ## 요약과 기술 `summary`와 `description`을 추가할 수 있습니다: {* ../../docs_src/path_operation_configuration/tutorial003.py hl[20:21] *} ## 독스트링으로 만든 기술Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 3.9K bytes - Viewed (0) -
docs/zh/docs/how-to/configure-swagger-ui.md
但是你可以通过设置 `syntaxHighlight` 为 `False` 来禁用 Swagger UI 中的语法高亮: {* ../../docs_src/configure_swagger_ui/tutorial001.py hl[3] *} ...在此之后,Swagger UI 将不会高亮代码: <img src="/img/tutorial/extending-openapi/image03.png"> ## 改变主题 同样地,你也可以通过设置键 `"syntaxHighlight.theme"` 来设置语法高亮主题(注意中间有一个点): {* ../../docs_src/configure_swagger_ui/tutorial002.py hl[3] *} 这个配置会改变语法高亮主题: <img src="/img/tutorial/extending-openapi/image04.png">Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 2.6K bytes - Viewed (0) -
docs/ko/docs/tutorial/query-params.md
매개변수들은 이름으로 감지됩니다: {* ../../docs_src/query_params/tutorial004.py hl[8,10] *} ## 필수 쿼리 매개변수 경로가 아닌 매개변수에 대한 기본값을 선언할 때(지금은 쿼리 매개변수만 보았습니다), 해당 매개변수는 필수적(Required)이지 않았습니다. 특정값을 추가하지 않고 선택적으로 만들기 위해선 기본값을 `None`으로 설정하면 됩니다. 그러나 쿼리 매개변수를 필수로 만들려면 단순히 기본값을 선언하지 않으면 됩니다: {* ../../docs_src/query_params/tutorial005.py hl[6:7] *} 여기 쿼리 매개변수 `needy`는 `str`형인 필수 쿼리 매개변수입니다.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 5.2K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_configurations/test_tutorial003_tutorial004.py
import pytest from dirty_equals import IsList from fastapi.testclient import TestClient from ...utils import needs_py310 DESCRIPTIONS = { "tutorial003": "Create an item with all the information, name, description, price, tax and a set of unique tags", "tutorial004": dedent(""" Create an item with all the information: - **name**: each item must have a name - **description**: a long descriptionRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 7K bytes - Viewed (0) -
docs/fr/docs/tutorial/query-params-str-validations.md
Pour cela, importez d'abord `Query` depuis `fastapi` : {* ../../docs_src/query_params_str_validations/tutorial002.py hl[3] *} ## Utiliser `Query` comme valeur par défaut Construisez ensuite la valeur par défaut de votre paramètre avec `Query`, en choisissant 50 comme `max_length` : {* ../../docs_src/query_params_str_validations/tutorial002.py hl[9] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Nov 09 16:39:20 UTC 2024 - 9.5K bytes - Viewed (0) -
docs/ko/docs/advanced/events.md
{* ../../docs_src/events/tutorial003.py hl[14:19] *} 함수의 첫 번째 부분, 즉 `yield` 이전의 코드는 애플리케이션이 시작되기 **전에** 실행됩니다. 그리고 `yield` 이후의 부분은 애플리케이션이 완료된 후 **나중에** 실행됩니다. ### 비동기 컨텍스트 매니저 함수를 확인해보면, `@asynccontextmanager`로 장식되어 있습니다. 이것은 함수를 "**비동기 컨텍스트 매니저**"라고 불리는 것으로 변환시킵니다. {* ../../docs_src/events/tutorial003.py hl[1,13] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 9.2K bytes - Viewed (0) -
docs/ja/docs/tutorial/response-model.md
代わりに、平文のパスワードを持つ入力モデルと、パスワードを持たない出力モデルを作成することができます: {* ../../docs_src/response_model/tutorial003.py hl[9,11,16] *} ここでは、*path operation関数*がパスワードを含む同じ入力ユーザーを返しているにもかかわらず: {* ../../docs_src/response_model/tutorial003.py hl[24] *} ...`response_model`を`UserOut`と宣言したことで、パスワードが含まれていません: {* ../../docs_src/response_model/tutorial003.py hl[22] *} そのため、**FastAPI** は出力モデルで宣言されていない全てのデータをフィルタリングしてくれます(Pydanticを使用)。 ## ドキュメントを見るRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 9K bytes - Viewed (0) -
docs/uk/docs/tutorial/metadata.md
* Ви можете вимкнути його, встановивши `redoc_url=None`. Наприклад, щоб налаштувати Swagger UI на `/documentation` і вимкнути ReDoc:
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Mar 19 17:09:57 UTC 2025 - 8.4K bytes - Viewed (0) -
docs/fr/docs/advanced/path-operation-advanced-configuration.md
Pour exclure un *chemin* du schéma OpenAPI généré (et donc des systèmes de documentation automatiques), utilisez le paramètre `include_in_schema` et assignez-lui la valeur `False` : {* ../../docs_src/path_operation_advanced_configuration/tutorial003.py hl[6] *} ## Description avancée de docstring Vous pouvez limiter le texte utilisé de la docstring d'une *fonction de chemin* qui sera affiché sur OpenAPI.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Nov 09 16:39:20 UTC 2024 - 7.8K bytes - Viewed (0)