- Sort Score
- Num 10 results
- Language All
Results 1071 - 1080 of 2,110 for py$ (0.01 seconds)
-
docs/en/docs/tutorial/cookie-param-models.md
Declare the **cookie** parameters that you need in a **Pydantic model**, and then declare the parameter as `Cookie`: {* ../../docs_src/cookie_param_models/tutorial001_an_py310.py hl[9:12,16] *} **FastAPI** will **extract** the data for **each field** from the **cookies** received in the request and give you the Pydantic model you defined. ## Check the Docs { #check-the-docs }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 10 11:48:27 GMT 2026 - 3.1K bytes - Click Count (0) -
docs/zh/docs/how-to/migrate-from-pydantic-v1-to-pydantic-v2.md
{* ../../docs_src/pydantic_v1_in_v2/tutorial001_an_py310.py hl[1,4] *} ### FastAPI 对 v2 中 Pydantic v1 的支持 { #fastapi-support-for-pydantic-v1-in-v2 } 自 FastAPI 0.119.0 起,FastAPI 也对 Pydantic v2 内的 Pydantic v1 提供了部分支持,以便迁移到 v2。 因此,你可以将 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 17:06:37 GMT 2026 - 5.1K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/request-forms.md
``` /// ## 匯入 `Form` { #import-form } 從 `fastapi` 匯入 `Form`: {* ../../docs_src/request_forms/tutorial001_an_py310.py hl[3] *} ## 定義 `Form` 參數 { #define-form-parameters } 以與 `Body` 或 `Query` 相同的方式建立表單參數: {* ../../docs_src/request_forms/tutorial001_an_py310.py hl[9] *} 例如,在 OAuth2 規範的一種用法(稱為「password flow」)中,必須以表單欄位傳送 `username` 與 `password`。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 2.5K bytes - Click Count (0) -
docs/en/docs/advanced/additional-responses.md
For example, to declare another response with a status code `404` and a Pydantic model `Message`, you can write: {* ../../docs_src/additional_responses/tutorial001_py310.py hl[18,22] *} /// note Keep in mind that you have to return the `JSONResponse` directly. /// /// info The `model` key is not part of OpenAPI.Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 8.8K bytes - Click Count (0) -
docs/en/docs/tutorial/request-form-models.md
You just need to declare a **Pydantic model** with the fields you want to receive as **form fields**, and then declare the parameter as `Form`: {* ../../docs_src/request_form_models/tutorial001_an_py310.py hl[9:11,15] *} **FastAPI** will **extract** the data for **each field** from the **form data** in the request and give you the Pydantic model you defined. ## Check the Docs { #check-the-docs }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 2.1K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/cookie-params.md
## 匯入 `Cookie` { #import-cookie } 先匯入 `Cookie`: {* ../../docs_src/cookie_params/tutorial001_an_py310.py hl[3] *} ## 宣告 `Cookie` 參數 { #declare-cookie-parameters } 然後用與 `Path`、`Query` 相同的結構宣告 `Cookie` 參數。 你可以設定預設值,以及所有額外的驗證或註解參數: {* ../../docs_src/cookie_params/tutorial001_an_py310.py hl[9] *} /// note | 技術細節 `Cookie` 是 `Path` 與 `Query` 的「姊妹」類別。它同樣繼承自共同的 `Param` 類別。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:15:26 GMT 2026 - 1.5K bytes - Click Count (0) -
src/main/webapp/WEB-INF/orig/view/searchNoResult.jsp
<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%> <%-- query did not match any document --%> <div id="result" class="row"> <div class="col-md-8"> <div class="text-center py-4"> <p class="mb-3"><i class="fa fa-search fa-3x text-muted" aria-hidden="true"></i></p> <p class="mb-2"><la:message key="labels.did_not_match" arg0="${displayQuery}" /></p> <p class="text-muted"><la:message key="labels.did_not_match_suggestion" /></p>
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Mon Feb 23 08:03:44 GMT 2026 - 969 bytes - Click Count (0) -
docs/zh/docs/advanced/additional-responses.md
**FastAPI** 会获取该模型,生成它的 JSON Schema,并将其放在 OpenAPI 中的正确位置。 例如,要声明另一个状态码为 `404` 且具有 Pydantic 模型 `Message` 的响应,你可以这样写: {* ../../docs_src/additional_responses/tutorial001_py310.py hl[18,22] *} /// note | 注意 记住你需要直接返回 `JSONResponse`。 /// /// info | 信息 `model` 键不是 OpenAPI 的一部分。 **FastAPI** 会从这里获取 Pydantic 模型,生成 JSON Schema,并把它放到正确的位置。 正确的位置是:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 8.7K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/security/simple-oauth2.md
現在用 **FastAPI** 提供的工具來處理。 ### `OAuth2PasswordRequestForm` { #oauth2passwordrequestform } 先匯入 `OAuth2PasswordRequestForm`,並在 `/token` 的路徑操作中,搭配 `Depends` 當作依賴使用: {* ../../docs_src/security/tutorial003_an_py310.py hl[4,78] *} `OAuth2PasswordRequestForm` 是一個類別型依賴,它宣告了一個表單本文,包含: - `username` - `password` - 可選的 `scope` 欄位,內容是一個由空白分隔的長字串 - 可選的 `grant_type` /// tipCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 9.1K bytes - Click Count (0) -
docs/zh/docs/advanced/security/http-basic-auth.md
* 导入 `HTTPBasic` 与 `HTTPBasicCredentials` * 使用 `HTTPBasic` 创建**安全方案** * 在*路径操作*的依赖项中使用 `security` * 返回类型为 `HTTPBasicCredentials` 的对象: * 包含发送的 `username` 与 `password` {* ../../docs_src/security/tutorial006_an_py310.py hl[4,8,12] *} 第一次打开 URL(或在 API 文档中点击 **Execute** 按钮)时,浏览器要求输入用户名与密码: <img src="/img/tutorial/security/image12.png"> ## 检查用户名 { #check-the-username } 以下是更完整的示例。 使用依赖项检查用户名与密码是否正确。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 4.4K bytes - Click Count (0)