webapp2 架構
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
注意:此架構僅適用於 Python 2.7 使用者。
網路應用程式架構可妥善處理介面的細節,進而簡化開發程序,讓您專注在應用程式功能的開發作業。App Engine 提供一套名為 webapp2 的簡易網路應用程式架構;您可以透過這個簡易的架構,快速建構適用於 Python 2.7 執行階段的簡易網路應用程式。
webapp2 與 Python 網路應用程式的 WSGI 標準相容。您不必使用 webapp2 編寫 App Engine 的 Python 應用程式。其他網路應用程式架構 (例如
Django) 可與 App Engine 搭配使用,而 App Engine 也支援任何使用 CGI 標準的 Python 程式碼。Rodrigo Moraes 的 webapp2 專案一開始是 App Engine webapp 架構的分支,該架構由 Python 2.5 執行階段使用。webapp2 包含多項可簡化網路應用程式開發作業的功能,例如改善 URI 路由、工作階段管理和本地化功能的支援。Python 2.7 執行階段使用的是 webapp2,而專案是在 App Engine 外部進行維護。Google 雖有提供支援,但並非由 Google 維護。
如要進一步瞭解 webapp2,請參閱官方說明文件。
在 Python 2.7 中使用 webapp2 架構
Python 2.7 應用程式可使用 WSGI 或 CGI 來處理要求,但通常建議使用 WSGI。
Blobstore 與郵件處理常式
webapp2 是外部程式庫,因此不提供任何 App Engine 專屬服務。Python 2.7 應用程式必須使用 BlobstoreUploadHandler
和 BlobstoreDownloadHandler
的 webapp 版本。詳情請參閱「webapp Blobstore 處理常式」。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-05-30 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-05-30 (世界標準時間)。"],[[["webapp2 is a lightweight web application framework for Python 2.7, simplifying development by handling interface details and allowing developers to focus on application features."],["webapp2 is compatible with the WSGI standard but not exclusive; other frameworks like Django are also supported, and any Python code using CGI works with App Engine."],["Originally forked from the App Engine webapp framework used by the Python 2.5 runtime, webapp2 includes improved features such as better URI routing, session management, and localization."],["Although webapp2 is an external library and is supported but not maintained by Google, it does not provide any App Engine-specific services, so Python 2.7 apps must use webapp versions of `BlobstoreUploadHandler` and `BlobstoreDownloadHandler`."]]],[]]