- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 200 for tutorial002 (0.06 sec)
-
docs/zh/docs/advanced/custom-response.md
/// {* ../../docs_src/custom_response/tutorial001.py hl[2,7] *} /// tip | 小贴士 `ORJSONResponse` 可能是一个更快的选择。 /// ### `RedirectResponse` 返回 HTTP 重定向。默认情况下使用 307 状态代码(临时重定向)。 {* ../../docs_src/custom_response/tutorial006.py hl[2,9] *} ### `StreamingResponse` 采用异步生成器或普通生成器/迭代器,然后流式传输响应主体。 {* ../../docs_src/custom_response/tutorial007.py hl[2,14] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 7.5K bytes - Viewed (0) -
docs/zh/docs/tutorial/security/get-current-user.md
{* ../../docs_src/security/tutorial002.py hl[25] *} ## 获取用户 `get_current_user` 使用创建的(伪)工具函数,该函数接收 `str` 类型的令牌,并返回 Pydantic 的 `User` 模型: {* ../../docs_src/security/tutorial002.py hl[19:22,26:27] *} ## 注入当前用户 在*路径操作* 的 `Depends` 中使用 `get_current_user`: {* ../../docs_src/security/tutorial002.py hl[31] *} 注意,此处把 `current_user` 的类型声明为 Pydantic 的 `User` 模型。Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 3.4K bytes - Viewed (0) -
docs/ko/docs/tutorial/body-nested-models.md
어트리뷰트를 서브타입으로 정의할 수 있습니다. 예를 들어 파이썬 `list`는: {* ../../docs_src/body_nested_models/tutorial001.py hl[14] *} 이는 `tags`를 항목 리스트로 만듭니다. 각 항목의 타입을 선언하지 않더라도요. ## 타입 매개변수가 있는 리스트 필드 하지만 파이썬은 내부의 타입이나 "타입 매개변수"를 선언할 수 있는 특정 방법이 있습니다: ### typing의 `List` 임포트 먼저, 파이썬 표준 `typing` 모듈에서 `List`를 임포트합니다: {* ../../docs_src/body_nested_models/tutorial002.py hl[1] *} ### 타입 매개변수로 `List` 선언Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 7.3K 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/tutorial/response-model.md
대신 평문 비밀번호로 입력 모델을 만들고 해당 비밀번호 없이 출력 모델을 만들 수 있습니다: {* ../../docs_src/response_model/tutorial003.py hl[9,11,16] *} 여기서 *경로 작동 함수*가 비밀번호를 포함하는 동일한 입력 사용자를 반환할지라도: {* ../../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 - 7.9K bytes - Viewed (0) -
docs/ko/docs/tutorial/security/get-current-user.md
{* ../../docs_src/security/tutorial002.py hl[25] *} ## 유저 가져오기 `get_current_user`는 토큰을 `str`로 취하고 Pydantic `User` 모델을 반환하는 우리가 만든 (가짜) 유틸리티 함수를 사용합니다. {* ../../docs_src/security/tutorial002.py hl[19:22,26:27] *} ## 현재 유저 주입하기 이제 *경로 작동*에서 `get_current_user`와 동일한 `Depends`를 사용할 수 있습니다. {* ../../docs_src/security/tutorial002.py hl[31] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 4.7K bytes - Viewed (0) -
docs/ko/docs/tutorial/query-params-str-validations.md
### `Query` 임포트 이를 위해 먼저 `fastapi`에서 `Query`를 임포트합니다: {* ../../docs_src/query_params_str_validations/tutorial002.py hl[3] *} ## 기본값으로 `Query` 사용 이제 `Query`를 매개변수의 기본값으로 사용하여 `max_length` 매개변수를 50으로 설정합니다: {* ../../docs_src/query_params_str_validations/tutorial002.py hl[9] *} 기본값 `None`을 `Query(None)`으로 바꿔야 하므로, `Query`의 첫 번째 매개변수는 기본값을 정의하는 것과 같은 목적으로 사용됩니다. 그러므로: ```PythonRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 9.2K bytes - Viewed (0) -
docs/ja/docs/tutorial/security/get-current-user.md
{* ../../docs_src/security/tutorial002.py hl[25] *} ## ユーザーの取得 `get_current_user` は作成した(偽物の)ユーティリティ関数を使って、 `str` としてトークンを受け取り、先ほどのPydanticの `User` モデルを返却します: {* ../../docs_src/security/tutorial002.py hl[19:22,26:27] *} ## 現在のユーザーの注入 ですので、 `get_current_user` に対して同様に *path operation* の中で `Depends` を利用できます。 {* ../../docs_src/security/tutorial002.py hl[31] *}Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 5.4K bytes - Viewed (0) -
docs/ja/docs/advanced/custom-response.md
{* ../../docs_src/response_directly/tutorial002.py hl[1,18] *} ### `HTMLResponse` 上で読んだように、テキストやバイトを受け取り、HTMLレスポンスを返します。 ### `PlainTextResponse` テキストやバイトを受け取り、プレーンテキストのレスポンスを返します。 {* ../../docs_src/custom_response/tutorial005.py hl[2,7,9] *} ### `JSONResponse` データを受け取り、 `application/json` としてエンコードされたレスポンスを返します。Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 10.4K bytes - Viewed (0) -
docs/ko/docs/advanced/custom-response.md
{* ../../docs_src/response_directly/tutorial002.py hl[1,18] *} ### `HTMLResponse` 텍스트 또는 바이트를 받아 HTML 응답을 반환합니다. 위에서 설명한 내용과 같습니다. ### `PlainTextResponse` 텍스트 또는 바이트를 받아 일반 텍스트 응답을 반환합니다. {* ../../docs_src/custom_response/tutorial005.py hl[2,7,9] *} ### `JSONResponse` 데이터를 받아 `application/json`으로 인코딩된 응답을 반환합니다.Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Feb 15 11:21:20 UTC 2025 - 13.4K bytes - Viewed (0)