From fc7d3adec03fd5fe8ab765ecc2c8b9dd1c5f3069 Mon Sep 17 00:00:00 2001 From: Yurii Motov Date: Wed, 1 Jul 2026 15:54:23 +0200 Subject: [PATCH] Make edits to unchanged files to update latest commit date --- .../docs/advanced/additional-status-codes.md | 1 + .../docs/advanced/advanced-dependencies.md | 1 + docs/zh-hant/docs/advanced/events.md | 1 + .../advanced/response-change-status-code.md | 1 + docs/zh-hant/docs/advanced/wsgi.md | 1 + docs/zh-hant/docs/deployment/concepts.md | 1 + docs/zh-hant/docs/deployment/https.md | 1 + docs/zh-hant/docs/editor-support.md | 1 + docs/zh-hant/docs/environment-variables.md | 1 + docs/zh-hant/docs/help-fastapi.md | 1 + docs/zh-hant/docs/project-generation.md | 1 + .../docs/tutorial/bigger-applications.md | 20 +++++++++---------- .../docs/tutorial/body-nested-models.md | 1 + docs/zh-hant/docs/tutorial/debugging.md | 1 + .../zh-hant/docs/tutorial/extra-data-types.md | 1 + .../tutorial/path-operation-configuration.md | 1 + docs/zh-hant/docs/tutorial/request-files.md | 1 + docs/zh-hant/docs/tutorial/request-forms.md | 1 + .../docs/tutorial/response-status-code.md | 1 + 19 files changed, 28 insertions(+), 10 deletions(-) diff --git a/docs/zh-hant/docs/advanced/additional-status-codes.md b/docs/zh-hant/docs/advanced/additional-status-codes.md index 0e5941a8d..bbb4f57dc 100644 --- a/docs/zh-hant/docs/advanced/additional-status-codes.md +++ b/docs/zh-hant/docs/advanced/additional-status-codes.md @@ -1,5 +1,6 @@ # 額外的狀態碼 { #additional-status-codes } + 在預設情況下,**FastAPI** 會使用 `JSONResponse` 傳回回應,並把你從你的「路徑操作(path operation)」回傳的內容放進該 `JSONResponse` 中。 它會使用預設的狀態碼,或你在路徑操作中設定的狀態碼。 diff --git a/docs/zh-hant/docs/advanced/advanced-dependencies.md b/docs/zh-hant/docs/advanced/advanced-dependencies.md index 880d92ce9..92dabdaf1 100644 --- a/docs/zh-hant/docs/advanced/advanced-dependencies.md +++ b/docs/zh-hant/docs/advanced/advanced-dependencies.md @@ -1,5 +1,6 @@ # 進階相依 { #advanced-dependencies } + ## 參數化的相依 { #parameterized-dependencies } 到目前為止看到的相依都是固定的函式或類別。 diff --git a/docs/zh-hant/docs/advanced/events.md b/docs/zh-hant/docs/advanced/events.md index 60014a90a..e132d9f3d 100644 --- a/docs/zh-hant/docs/advanced/events.md +++ b/docs/zh-hant/docs/advanced/events.md @@ -1,5 +1,6 @@ # 生命週期事件 { #lifespan-events } + 你可以定義在應用程式**啟動**之前要執行的邏輯(程式碼)。也就是說,這段程式碼會在應用開始接收請求**之前**、**只執行一次**。 同樣地,你也可以定義在應用程式**關閉**時要執行的邏輯(程式碼)。在這種情況下,這段程式碼會在處理了**許多請求**之後、**只執行一次**。 diff --git a/docs/zh-hant/docs/advanced/response-change-status-code.md b/docs/zh-hant/docs/advanced/response-change-status-code.md index 31b688512..ee6373a30 100644 --- a/docs/zh-hant/docs/advanced/response-change-status-code.md +++ b/docs/zh-hant/docs/advanced/response-change-status-code.md @@ -1,5 +1,6 @@ # 回應 - 變更狀態碼 { #response-change-status-code } + 你可能已經讀過,可以設定預設的[回應狀態碼](../tutorial/response-status-code.md)。 但有些情況你需要回傳與預設不同的狀態碼。 diff --git a/docs/zh-hant/docs/advanced/wsgi.md b/docs/zh-hant/docs/advanced/wsgi.md index 944720bb6..161496a98 100644 --- a/docs/zh-hant/docs/advanced/wsgi.md +++ b/docs/zh-hant/docs/advanced/wsgi.md @@ -1,5 +1,6 @@ # 包含 WSGI:Flask、Django 等 { #including-wsgi-flask-django-others } + 你可以像在 [子應用程式 - 掛載](sub-applications.md)、[在 Proxy 後方](behind-a-proxy.md) 中所見那樣掛載 WSGI 應用。 為此,你可以使用 `WSGIMiddleware` 來包住你的 WSGI 應用,例如 Flask、Django 等。 diff --git a/docs/zh-hant/docs/deployment/concepts.md b/docs/zh-hant/docs/deployment/concepts.md index 0b8677bfd..070bcf544 100644 --- a/docs/zh-hant/docs/deployment/concepts.md +++ b/docs/zh-hant/docs/deployment/concepts.md @@ -1,5 +1,6 @@ # 部署概念 { #deployments-concepts } + 當你要部署一個 FastAPI 應用,或其實任何類型的 Web API 時,有幾個你可能在意的概念。掌握這些概念後,你就能找出最適合部署你應用的方式。 一些重要的概念包括: diff --git a/docs/zh-hant/docs/deployment/https.md b/docs/zh-hant/docs/deployment/https.md index ddafcb34b..fead5a4b9 100644 --- a/docs/zh-hant/docs/deployment/https.md +++ b/docs/zh-hant/docs/deployment/https.md @@ -1,5 +1,6 @@ # 關於 HTTPS { #about-https } + 人們很容易以為 HTTPS 只是「啟用或未啟用」的功能。 但實際上複雜得多。 diff --git a/docs/zh-hant/docs/editor-support.md b/docs/zh-hant/docs/editor-support.md index ff4d8f43d..a48336d9b 100644 --- a/docs/zh-hant/docs/editor-support.md +++ b/docs/zh-hant/docs/editor-support.md @@ -1,5 +1,6 @@ # 編輯器支援 { #editor-support } + 官方的 [FastAPI 擴充套件](https://marketplace.visualstudio.com/items?itemName=FastAPILabs.fastapi-vscode) 透過支援路徑操作(path operation)探索、導覽,以及 FastAPI Cloud 部署與即時日誌串流,強化你的 FastAPI 開發流程。 想了解更多關於此擴充套件的細節,請參考其 [GitHub 儲存庫](https://github.com/fastapi/fastapi-vscode) 中的 README。 diff --git a/docs/zh-hant/docs/environment-variables.md b/docs/zh-hant/docs/environment-variables.md index 09264b7e2..71248ac63 100644 --- a/docs/zh-hant/docs/environment-variables.md +++ b/docs/zh-hant/docs/environment-variables.md @@ -1,5 +1,6 @@ # 環境變數 { #environment-variables } + /// tip 如果你已經知道什麼是「環境變數」並且知道如何使用它們,你可以放心跳過這一部分。 diff --git a/docs/zh-hant/docs/help-fastapi.md b/docs/zh-hant/docs/help-fastapi.md index 69af48a56..4a4a4fda5 100644 --- a/docs/zh-hant/docs/help-fastapi.md +++ b/docs/zh-hant/docs/help-fastapi.md @@ -1,5 +1,6 @@ # 協助 { #help } + 你想要協助 FastAPI,或取得關於 FastAPI 的協助嗎? 有一些非常簡單的方式可以提供協助並取得協助。 diff --git a/docs/zh-hant/docs/project-generation.md b/docs/zh-hant/docs/project-generation.md index fc5c8e465..862417aff 100644 --- a/docs/zh-hant/docs/project-generation.md +++ b/docs/zh-hant/docs/project-generation.md @@ -1,5 +1,6 @@ # 全端 FastAPI 範本 { #full-stack-fastapi-template } + 範本通常附帶特定的設定,但設計上具有彈性且可自訂。這讓你可以依專案需求調整與擴充,因此非常適合作為起點。🏁 你可以使用此範本快速起步,裡面已替你完成大量初始設定、安全性、資料庫,以及部分 API 端點。 diff --git a/docs/zh-hant/docs/tutorial/bigger-applications.md b/docs/zh-hant/docs/tutorial/bigger-applications.md index 7ebf59a74..624b2c2bc 100644 --- a/docs/zh-hant/docs/tutorial/bigger-applications.md +++ b/docs/zh-hant/docs/tutorial/bigger-applications.md @@ -17,16 +17,16 @@ FastAPI 提供了一個方便的工具,讓你在維持彈性的同時,幫你 ``` . ├── app -│   ├── __init__.py -│   ├── main.py -│   ├── dependencies.py -│   └── routers -│   │ ├── __init__.py -│   │ ├── items.py -│   │ └── users.py -│   └── internal -│   ├── __init__.py -│   └── admin.py +│ ├── __init__.py +│ ├── main.py +│ ├── dependencies.py +│ └── routers +│ │ ├── __init__.py +│ │ ├── items.py +│ │ └── users.py +│ └── internal +│ ├── __init__.py +│ └── admin.py ``` /// tip | 提示 diff --git a/docs/zh-hant/docs/tutorial/body-nested-models.md b/docs/zh-hant/docs/tutorial/body-nested-models.md index 161920acd..4e2e6427c 100644 --- a/docs/zh-hant/docs/tutorial/body-nested-models.md +++ b/docs/zh-hant/docs/tutorial/body-nested-models.md @@ -1,5 +1,6 @@ # Body - 巢狀模型 { #body-nested-models } + 使用 **FastAPI**,你可以定義、驗證、文件化,並使用任意深度的巢狀模型(感謝 Pydantic)。 ## 列表欄位 { #list-fields } diff --git a/docs/zh-hant/docs/tutorial/debugging.md b/docs/zh-hant/docs/tutorial/debugging.md index 9501dec5c..a3254e3d1 100644 --- a/docs/zh-hant/docs/tutorial/debugging.md +++ b/docs/zh-hant/docs/tutorial/debugging.md @@ -1,5 +1,6 @@ # 偵錯 { #debugging } + 你可以在編輯器中連接偵錯器,例如 Visual Studio Code 或 PyCharm。 ## 呼叫 `uvicorn` { #call-uvicorn } diff --git a/docs/zh-hant/docs/tutorial/extra-data-types.md b/docs/zh-hant/docs/tutorial/extra-data-types.md index a5573379d..23c753232 100644 --- a/docs/zh-hant/docs/tutorial/extra-data-types.md +++ b/docs/zh-hant/docs/tutorial/extra-data-types.md @@ -1,5 +1,6 @@ # 額外的資料型別 { #extra-data-types } + 到目前為止,你一直在使用常見的資料型別,例如: * `int` diff --git a/docs/zh-hant/docs/tutorial/path-operation-configuration.md b/docs/zh-hant/docs/tutorial/path-operation-configuration.md index 8461f2521..edd10178c 100644 --- a/docs/zh-hant/docs/tutorial/path-operation-configuration.md +++ b/docs/zh-hant/docs/tutorial/path-operation-configuration.md @@ -1,5 +1,6 @@ # 路徑操作設定 { #path-operation-configuration } + 你可以在你的「路徑操作裝飾器」中傳入多個參數來進行設定。 /// warning | 警告 diff --git a/docs/zh-hant/docs/tutorial/request-files.md b/docs/zh-hant/docs/tutorial/request-files.md index 1d95bf0cd..979a579eb 100644 --- a/docs/zh-hant/docs/tutorial/request-files.md +++ b/docs/zh-hant/docs/tutorial/request-files.md @@ -1,5 +1,6 @@ # 請求中的檔案 { #request-files } + 你可以使用 `File` 定義由用戶端上傳的檔案。 /// note diff --git a/docs/zh-hant/docs/tutorial/request-forms.md b/docs/zh-hant/docs/tutorial/request-forms.md index 28d50c3af..590779168 100644 --- a/docs/zh-hant/docs/tutorial/request-forms.md +++ b/docs/zh-hant/docs/tutorial/request-forms.md @@ -1,5 +1,6 @@ # 表單資料 { #form-data } + 當你需要接收表單欄位而不是 JSON 時,可以使用 `Form`。 /// note diff --git a/docs/zh-hant/docs/tutorial/response-status-code.md b/docs/zh-hant/docs/tutorial/response-status-code.md index 9ed047fa5..d649dc785 100644 --- a/docs/zh-hant/docs/tutorial/response-status-code.md +++ b/docs/zh-hant/docs/tutorial/response-status-code.md @@ -1,5 +1,6 @@ # 回應狀態碼 { #response-status-code } + 就像你可以指定回應模型一樣,你也可以在任一個「路徑操作(path operation)」的參數 `status_code` 中宣告回應所使用的 HTTP 狀態碼: * `@app.get()`