Python 2.7 已达到支持终止期限,并将于 2026 年 1 月 31 日
弃用。弃用后,您将无法部署 Python 2.7 应用,即使您的组织之前曾使用组织政策重新启用旧版运行时的部署也是如此。现有的 Python 2.7 应用在
弃用日期之后将继续运行并接收流量。我们建议您
迁移到最新支持的 Python 版本。
内置的第三方库
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
此页面介绍了可与 App Engine Python 2.7 运行时环境配合使用的内置第三方库。使用本地开发服务器执行测试时,某些库要求安装在本地。
App Engine Python 2.7 运行时环境可以为您的应用提供以下第三方库:
名称 |
默认版本 |
支持的版本 |
说明 |
django
| (无) |
"1.2" (已弃用) "1.3" (已弃用) "1.4" "1.5" (已弃用) "1.9" (已弃用) "1.11" |
适用于 Python 的功能全面的网络应用框架。 |
枚举
| (无) |
"0.9.23" |
在 python 3.4 中引入的枚举模块的反向移植 |
端点
| (无) |
"1.0" |
用于在 App Engine 应用中构建 API 的库。 |
flask
| (无) |
"0.12" |
Flask 是 Python 的微框架,基于 Werkzeug 和 Jinja 2,并且需用于适当用途。 |
futures
| (无) |
"3.0.5" |
Python 3.2 Futures 的反向移植。 |
grpcio
| (无) |
"1.0.0" |
高性能通用 RPC 框架。(“1.1.0dev”不再受支持。请改用 1.0.0”。) |
jinja2
| (无) |
"2.6" |
适用于 Python 的现代化模板语言,便于设计人员使用。 |
lxml
| (无) |
“ 2.3” (已弃用) “2.3.5” (已弃用) “3.7.3” |
C 库 libxml2 和 libxslt 的 Pythonic 绑定。 |
markupsafe
| (无) |
"0.15" "0.23" |
适用于 Python 的 XML/HTML/XHTML 标记安全字符串。 |
matplotlib
| (无) |
"1.2.0" |
2D 绘制库,可生成出版级品质的图形。 |
MySQLdb
| (无) |
"1.2.4b4" (已弃用) "1.2.4" (已弃用) "1.2.5" |
MySQL 的 Python DB API v2.0 兼容接口。 |
numpy
| (无) |
"1.6.1" |
用于数组处理的通用库。 |
PIL
| (无) |
"1.1.7" |
用于创建和转换图片的库。 |
protorpc
| "1.0" |
"1.0" |
用于实现基于 HTTP 的远程过程调用 (RPC) 服务的框架。 |
pytz
| "2017.3" |
"2016.4" (已弃用) "2017.2" (已弃用) "2017.3" |
用于跨平台时区计算的库 |
crcmod
| (无) |
"1.7" |
用于生成循环冗余校验 (CRC) 的库。 |
protobuf
| (无) |
"3.0.0"(Alpha 版) |
用于对结构化数据进行序列化的库。 |
PyAMF
| (无) |
"0.6.1" "0.7.2" (Alpha 版) |
提供动作消息格式 (AMF) 功能的库。 |
pycrypto
| (无) |
"2.3" (已弃用) "2.6" "2.6.1" |
加密函数库,例如随机数字生成。 |
setuptools
| (无) |
"0.6c11" (已弃用) "36.6.0" |
提供软件包和模块发现功能的库。 |
six
| "1.12.0" |
"1.9.0" "1.12.0" |
py2.x 和 py3 之间的抽象差异 |
ssl
| (无) |
"2.7" (已弃用) "2.7.11" |
SSL 套接字包装函数内置模块。 |
ujson
| (无) |
"1.35" |
UltraJSON 是一个完全使用 C 语言编写的超快 JSON 编解码器 |
webapp2
| "2.3" |
"2.3" "2.5.1" (已弃用) "2.5.2" |
轻量级 Python 网络框架。 |
webob
| "1.1.1" |
"1.1.1" "1.2.3" |
提供适用于 WSGI 请求环境的包装函数的库。 |
werkzeug
| "0.11.10" |
"0.11.10" |
WSGI 实用程序库。 |
yaml
| "3.10" |
"3.10" |
用于 YAML 序列化和反序列化的库。 |
如需了解如何使用这些库,请参阅在 Python 2.7 中使用内置库。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-09-04。
[[["易于理解","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-09-04。"],[[["\u003cp\u003eThis document details the third-party libraries available for use with the App Engine Python 2.7 runtime.\u003c/p\u003e\n"],["\u003cp\u003eThe App Engine Python 2.7 runtime offers a variety of libraries, including web frameworks, utility, and data-processing libraries, such as Django, Flask, NumPy, and many others.\u003c/p\u003e\n"],["\u003cp\u003eEach listed library has specified supported versions, and many do not have default versions pre-selected.\u003c/p\u003e\n"],["\u003cp\u003eSome libraries must be installed locally when using the local development server for testing purposes.\u003c/p\u003e\n"],["\u003cp\u003eThe provided content gives both information and specific links for the reader to learn more about how to use these built-in libraries.\u003c/p\u003e\n"]]],[],null,["# Built-in Third-party Libraries\n\nThis page documents and describes built-in third-party libraries that you can\nuse with the App Engine Python 2.7 runtime. Some [libraries require that\nyou install them locally](/appengine/docs/legacy/standard/python/tools/using-libraries-python-27#local_development) when testing with the local development server.\n\nThe App Engine Python 2.7 runtime can provide your application with the\nfollowing third-party libraries:\n\nFor information about how to use these libraries, see\n[Using Built-in Libraries in Python 2.7](/appengine/docs/legacy/standard/python/tools/using-libraries-python-27)."]]