webapp2 框架
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
注意:此框架仅适用于 Python 2.7 用户。
Web 应用框架可以通过处理接口的详细信息来简化开发过程,这样,您就可以集中精力开发应用的功能。App Engine 包含一个名为 webapp2 的简单 Web 应用框架,此轻量级框架允许您为 Python 2.7 运行时快速构建简单 Web 应用。
webapp2 兼容 Python Web 应用的 WSGI 标准。您无需使用 webapp2 为 App Engine 编写 Python 应用。其他 Web 应用框架(如 Django)也可以与 App Engine 配合使用,并且 App Engine 支持任何使用 CGI 标准的 Python 代码。由 Rodrigo Moraes 开发的 webapp2 项目最初作为 App Engine webapp 框架的一个分支,供 Python 2.5 运行时使用。webapp2 包含一些可简化 Web 应用开发的功能,例如改进了对 URI 路由、会话管理和本地化的支持。Python 2.7 运行时使用 webapp2,而且该项目在 App Engine 外部维护。Google 为其提供支持,但不进行维护。
如需详细了解 webapp2,请参阅官方文档。
在 Python 2.7 中使用 webapp2 框架
Python 2.7 应用可以使用 WSGI 或 CGI 来处理请求,但通常建议使用 WSGI。
Blobstore 和邮件处理程序
由于 webapp2 是外部库,因此不提供任何特定于 App Engine 的服务。Python 2.7 应用必须使用 BlobstoreUploadHandler
和 BlobstoreDownloadHandler
的 webapp 版本。如需了解详情,请参阅 webapp Blobstore 处理程序。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-03-06。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-03-06。"],[[["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`."]]],[]]