- Sort Score
- Num 10 results
- Language All
Results 901 - 910 of 2,110 for py$ (0.05 seconds)
-
docs/zh-hant/docs/how-to/custom-docs-ui-assets.md
### 專案檔案結構 { #project-file-structure } 假設你的專案檔案結構如下: ``` . ├── app │ ├── __init__.py │ ├── main.py ``` 現在建立一個目錄來存放這些靜態檔案。 新的檔案結構可能如下: ``` . ├── app │ ├── __init__.py │ ├── main.py └── static/ ``` ### 下載檔案 { #download-the-files } 下載文件所需的靜態檔案並放到 `static/` 目錄中。 你可以在各連結上按右鍵,選擇類似「另存連結為...」的選項。 Swagger UI 需要以下檔案:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 6.9K bytes - Click Count (0) -
docs/zh/docs/tutorial/body-multiple-params.md
首先,毫无疑问地,你可以随意地混合使用 `Path`、`Query` 和请求体参数声明,**FastAPI** 会知道该如何处理。 你还可以通过将默认值设置为 `None` 来将请求体参数声明为可选参数: {* ../../docs_src/body_multiple_params/tutorial001_an_py310.py hl[18:20] *} /// note | 注意 请注意,在这种情况下,将从请求体获取的 `item` 是可选的。因为它的默认值为 `None`。 /// ## 多个请求体参数 { #multiple-body-parameters } 在上面的示例中,*路径操作*将期望一个具有 `Item` 的属性的 JSON 请求体,就像: ```JSON {Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 13:37:57 GMT 2026 - 4.9K bytes - Click Count (0) -
docs/zh/docs/tutorial/body-updates.md
然后再用它生成一个只含已设置(在请求中发送)数据、且省略默认值的 `dict`: {* ../../docs_src/body_updates/tutorial002_py310.py hl[32] *} ### 使用 Pydantic 的 `update` 参数 { #using-pydantics-update-parameter } 接下来,用 `.model_copy()` 为已有模型创建副本,并传入 `update` 参数,值为包含更新数据的 `dict`。 例如,`stored_item_model.model_copy(update=update_data)`: {* ../../docs_src/body_updates/tutorial002_py310.py hl[33] *} ### 部分更新小结 { #partial-updates-recap } 简而言之,应用部分更新应当:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 3.7K bytes - Click Count (0) -
docs/en/docs/tutorial/response-model.md
{* ../../docs_src/response_model/tutorial003_py310.py hl[9,11,16] *} Here, even though our *path operation function* is returning the same input user that contains the password: {* ../../docs_src/response_model/tutorial003_py310.py hl[24] *} ...we declared the `response_model` to be our model `UserOut`, that doesn't include the password: {* ../../docs_src/response_model/tutorial003_py310.py hl[22] *}Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 15.5K bytes - Click Count (0) -
docs/en/docs/tutorial/body-multiple-params.md
And you can also declare body parameters as optional, by setting the default to `None`: {* ../../docs_src/body_multiple_params/tutorial001_an_py310.py hl[18:20] *} /// note Notice that, in this case, the `item` that would be taken from the body is optional. As it has a `None` default value. /// ## Multiple body parameters { #multiple-body-parameters }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 11 18:32:12 GMT 2026 - 4.8K bytes - Click Count (0) -
docs/zh-hant/docs/tutorial/path-operation-configuration.md
這些標籤會被加入到 OpenAPI 結構描述,並由自動化文件介面使用: <img src="/img/tutorial/path-operation-configuration/image01.png"> ### 含 Enum 的標籤 { #tags-with-enums } 如果你的應用很大,可能會累積數個標籤,你會希望對相關的「路徑操作」始終使用相同的標籤。 在這種情況下,可以考慮把標籤存放在 `Enum` 中。 **FastAPI** 對此的支援方式與使用普通字串相同: {* ../../docs_src/path_operation_configuration/tutorial002b_py310.py hl[1,8:10,13,18] *}
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 3.8K bytes - Click Count (0) -
docs/ko/docs/tutorial/path-params.md
{* ../../docs_src/path_params/tutorial003_py310.py hl[6,11] *} 그렇지 않으면 `/users/{user_id}`에 대한 경로가 `/users/me`에도 매칭되어, 매개변수 `user_id`에 `"me"` 값이 들어왔다고 "생각하게" 됩니다. 마찬가지로, 경로 처리를 재정의할 수는 없습니다: {* ../../docs_src/path_params/tutorial003b_py310.py hl[6,11] *} 경로가 먼저 매칭되기 때문에 첫 번째 것이 항상 사용됩니다. ## 사전정의 값 { #predefined-values }Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 9.9K bytes - Click Count (0) -
docs/en/docs/tutorial/dependencies/dependencies-in-path-operation-decorators.md
They can declare request requirements (like headers) or other sub-dependencies: {* ../../docs_src/dependencies/tutorial006_an_py310.py hl[8,13] *} ### Raise exceptions { #raise-exceptions } These dependencies can `raise` exceptions, the same as normal dependencies: {* ../../docs_src/dependencies/tutorial006_an_py310.py hl[10,15] *} ### Return values { #return-values } And they can return values or not, the values won't be used.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 18:13:19 GMT 2026 - 2.9K bytes - Click Count (0) -
docs/ko/docs/tutorial/server-sent-events.md
`EventSourceResponse`는 `fastapi.sse`에서 임포트합니다: {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[4,22] *} 각 `yield`된 항목은 JSON으로 인코딩되어 SSE 이벤트의 `data:` 필드로 전송됩니다. 반환 타입을 `AsyncIterable[Item]`으로 선언하면 FastAPI가 이를 사용해 데이터를 Pydantic으로 **검증**, **문서화**, **직렬화**합니다. {* ../../docs_src/server_sent_events/tutorial001_py310.py ln[1:25] hl[10:12,23] *} /// tip | 팁Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:56:39 GMT 2026 - 5.3K bytes - Click Count (0) -
docs/zh-hant/docs/python-types.md
## 動機 { #motivation } 先從一個簡單的例子開始: {* ../../docs_src/python_types/tutorial001_py310.py *} 執行這個程式會輸出: ``` John Doe ``` 這個函式會做以下事情: * 接收 `first_name` 與 `last_name`。 * 用 `title()` 把每個字的第一個字母轉成大寫。 * 用一個空白把它們<dfn title="把它們合在一起,成為一個。將其中一個的內容接在另一個後面。">串接</dfn>起來。 {* ../../docs_src/python_types/tutorial001_py310.py hl[2] *} ### 編輯它 { #edit-it } 這是一個非常簡單的程式。 但現在想像你正從零開始寫它。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:05:38 GMT 2026 - 10.7K bytes - Click Count (0)