- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 240 for tutorial004_an_py310 (0.09 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
docs/en/docs/tutorial/security/oauth2-jwt.md
If the token is invalid, return an HTTP error right away. {* ../../docs_src/security/tutorial004_an_py310.py hl[93:110] *} ## Update the `/token` *path operation* { #update-the-token-path-operation } Create a `timedelta` with the expiration time of the token. Create a real JWT access token and return it. {* ../../docs_src/security/tutorial004_an_py310.py hl[121:136] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 10.7K bytes - Click Count (0) -
docs/en/docs/tutorial/path-params-numeric-validations.md
{* ../../docs_src/path_params_numeric_validations/tutorial004_an_py310.py hl[10] *} ## Number validations: greater than and less than or equal { #number-validations-greater-than-and-less-than-or-equal } The same applies for: * `gt`: `g`reater `t`han * `le`: `l`ess than or `e`qual {* ../../docs_src/path_params_numeric_validations/tutorial005_an_py310.py hl[10] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 6.1K bytes - Click Count (0) -
docs/ko/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md
{* ../../docs_src/pydantic_v1_in_v2/tutorial001_an_py310.py hl[1,4] *} ### v2 안의 Pydantic v1에 대한 FastAPI 지원 { #fastapi-support-for-pydantic-v1-in-v2 } FastAPI 0.119.0부터는 v2로의 마이그레이션을 쉽게 하기 위해, Pydantic v2 내부의 Pydantic v1에 대해서도 부분적인 지원이 있습니다. 따라서 Pydantic을 최신 v2로 업그레이드하고, import를 `pydantic.v1` 서브모듈을 사용하도록 바꾸면, 많은 경우 그대로 동작합니다. {* ../../docs_src/pydantic_v1_in_v2/tutorial002_an_py310.py hl[2,5,15] *} /// warning | 경고Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 6.3K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/security/oauth2-jwt.md
定義一個用於權杖端點回應的 Pydantic Model。 建立一個工具函式來產生新的 access token。 {* ../../docs_src/security/tutorial004_an_py310.py hl[4,7,13:15,29:31,82:90] *} ## 更新相依項目 { #update-the-dependencies } 更新 `get_current_user`,讓它仍接收相同的權杖,但這次改用 JWT 權杖。 解碼收到的權杖、驗證它,並回傳目前的使用者。 如果權杖無效,立即回傳一個 HTTP 錯誤。 {* ../../docs_src/security/tutorial004_an_py310.py hl[93:110] *} ## 更新 `/token` 路徑操作 { #update-the-token-path-operation }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 10.1K bytes - Click Count (0) -
docs/zh/docs/tutorial/security/oauth2-jwt.md
定义一个用于令牌端点响应的 Pydantic 模型。 创建一个生成新访问令牌的工具函数。 {* ../../docs_src/security/tutorial004_an_py310.py hl[4,7,13:15,29:31,82:90] *} ## 更新依赖项 { #update-the-dependencies } 更新 `get_current_user` 以接收与之前相同的令牌,但这次使用的是 JWT 令牌。 解码接收到的令牌,进行校验,并返回当前用户。 如果令牌无效,立即返回一个 HTTP 错误。 {* ../../docs_src/security/tutorial004_an_py310.py hl[93:110] *} ## 更新 `/token` 路径操作 { #update-the-token-path-operation }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 10.1K bytes - Click Count (0) -
docs/en/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 5.4K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/path-params-numeric-validations.md
{* ../../docs_src/path_params_numeric_validations/tutorial003_an_py310.py hl[10] *} ## 數值驗證:大於或等於 { #number-validations-greater-than-or-equal } 使用 `Query` 和 `Path`(以及你之後會看到的其他類別)可以宣告數值限制。 這裡用 `ge=1`,代表 `item_id` 必須是「大於(`g`reater)或等於(`e`qual)」`1` 的整數。 {* ../../docs_src/path_params_numeric_validations/tutorial004_an_py310.py hl[10] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 5.8K bytes - Click Count (0) -
docs/ja/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md
{* ../../docs_src/pydantic_v1_in_v2/tutorial001_an_py310.py hl[1,4] *} ### v2 内の Pydantic v1 に対する FastAPI のサポート { #fastapi-support-for-pydantic-v1-in-v2 } FastAPI 0.119.0 以降では、移行を容易にするため、Pydantic v2 内の Pydantic v1 に対する部分的サポートもあります。 そのため、Pydantic を v2 の最新に上げ、インポートを `pydantic.v1` サブモジュールに切り替えるだけで、多くの場合そのまま動作します。 {* ../../docs_src/pydantic_v1_in_v2/tutorial002_an_py310.py hl[2,5,15] *} /// warning | 注意Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 6.2K bytes - Click Count (0) -
docs/ko/docs/tutorial/path-params-numeric-validations.md
{* ../../docs_src/path_params_numeric_validations/tutorial003_an_py310.py hl[10] *} ## 숫자 검증: 크거나 같음 { #number-validations-greater-than-or-equal } `Query`와 `Path`(그리고 나중에 볼 다른 것들)를 사용하여 숫자 제약을 선언할 수 있습니다. 여기서 `ge=1`인 경우, `item_id`는 `1`보다 "`g`reater than or `e`qual"(크거나 같은) 정수형 숫자여야 합니다. {* ../../docs_src/path_params_numeric_validations/tutorial004_an_py310.py hl[10] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 7.2K bytes - Click Count (0) -
docs/zh-hant/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md
{* ../../docs_src/pydantic_v1_in_v2/tutorial003_an_py310.py hl[2:3,6,12,21:22] *} 在上面的範例中,輸入模型是 Pydantic v1,輸出模型(於 `response_model=ItemV2` 定義)是 Pydantic v2。 ### Pydantic v1 參數 { #pydantic-v1-parameters } 若你需要在 Pydantic v1 模型上使用 FastAPI 的參數工具(例如 `Body`、`Query`、`Form` 等),在完成遷移到 Pydantic v2 之前,可以從 `fastapi.temp_pydantic_v1_params` 匯入: {* ../../docs_src/pydantic_v1_in_v2/tutorial004_an_py310.py hl[4,18] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 4.9K bytes - Click Count (0)