Python 常用的标准库以及第三方库有哪些

如题所述

Python常用库大全,看看有没有你需要的。
环境管理
管理 Python 版本和环境的工具
p – 非常简单的交互式 python 版本管理工具。
pyenv – 简单的 Python 版本管理工具。
Vex – 可以在虚拟环境中执行命令。
virtualenv – 创建独立 Python 环境的工具。
virtualenvwrapper- virtualenv 的一组扩展。
包管理
管理包和依赖的工具。
pip – Python 包和依赖关系管理工具。
pip-tools – 保证 Python 包依赖关系更新的一组工具。
conda – 跨平台,Python 二进制包管理工具。
Curdling – 管理 Python 包的命令行工具。
wheel – Python 分发的新标准,意在取代 eggs。
包仓库
本地 PyPI 仓库服务和代理。
warehouse – 下一代 PyPI。
Warehousebandersnatch – PyPA 提供的 PyPI 镜像工具。
devpi – PyPI 服务和打包/测试/分发工具。
localshop – 本地 PyPI 服务(自定义包并且自动对 PyPI 镜像)。
分发
打包为可执行文件以便分发。
PyInstaller – 将 Python 程序转换成独立的执行文件(跨平台)。
dh-virtualenv – 构建并将 virtualenv 虚拟环境作为一个 Debian 包来发布。
Nuitka – 将脚本、模块、包编译成可执行文件或扩展模块。
py2app – 将 Python 脚本变为独立软件包(Mac OS X)。
py2exe – 将 Python 脚本变为独立软件包(Windows)。
pynsist – 一个用来创建 Windows 安装程序的工具,可以在安装程序中打包 Python本身。
构建工具
将源码编译成软件。
buildout – 一个构建系统,从多个组件来创建,组装和部署应用。
BitBake – 针对嵌入式 Linux 的类似 make 的构建工具。
fabricate – 对任何语言自动找到依赖关系的构建工具。
PlatformIO – 多平台命令行构建工具。
PyBuilder – 纯 Python 实现的持续化构建工具。
SCons – 软件构建工具。
交互式解析器
交互式 Python 解析器。
IPython – 功能丰富的工具,非常有效的使用交互式 Python。
bpython- 界面丰富的 Python 解析器。
ptpython – 高级交互式Python解析器, 构建于python-prompt-toolkit 之上。
文件
文件管理和 MIME(多用途的网际邮件扩充协议)类型检测。
imghdr – (Python 标准库)检测图片类型。
mimetypes – (Python 标准库)将文件名映射为 MIME 类型。
path.py – 对 os.path 进行封装的模块。
pathlib – (Python3.4+ 标准库)跨平台的、面向对象的路径操作库。
python-magic- 文件类型检测的第三方库 libmagic 的 Python 接口。
Unipath- 用面向对象的方式操作文件和目录
watchdog – 管理文件系统事件的 API 和 shell 工具
日期和时间
操作日期和时间的类库。
arrow- 更好的 Python 日期时间操作类库。
Chronyk – Python 3 的类库,用于解析手写格式的时间和日期。
dateutil – Python datetime 模块的扩展。
delorean- 解决 Python 中有关日期处理的棘手问题的库。
moment – 一个用来处理时间和日期的Python库。灵感来自于Moment.js。
PyTime – 一个简单易用的Python模块,用于通过字符串来操作日期/时间。
pytz – 现代以及历史版本的世界时区定义。将时区数据库引入Python。
when.py – 提供用户友好的函数来帮助用户进行常用的日期和时间操作。
文本处理
用于解析和操作文本的库。
通用
chardet – 字符编码检测器,兼容 Python2 和 Python3。
difflib – (Python 标准库)帮助我们进行差异化比较。
ftfy – 让Unicode文本更完整更连贯。
fuzzywuzzy – 模糊字符串匹配。
Levenshtein – 快速计算编辑距离以及字符串的相似度。
pangu.py – 在中日韩语字符和数字字母之间添加空格。
pyfiglet -figlet 的 Python实现。
shortuuid – 一个生成器库,用以生成简洁的,明白的,URL 安全的 UUID。
unidecode – Unicode 文本的 ASCII 转换形式 。
uniout – 打印可读的字符,而不是转义的字符串。
xpinyin – 一个用于把汉字转换为拼音的库。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2017-06-27
standard libs:itertools http://docs.python.org/2/library/itertools.htmlfunctools http://docs.python.org/2/library/functools.html 学好python有必要掌握上面这两个库吧,re 正则subprocess http://docs.python.org/2/library/subprocess.html 调用shell命令的神器pdb 调试traceback 调试pprint 漂亮的输出logging 日志threading和multiprocessing 多线程urllib/urllib2/httplib http库,httplib底层一点,推荐第三方的库requestsos/sys 系统,环境相关Queue 队列pickle/cPickle 序列化工具hashlib md5, sha等hash算法cvsjson/simplejson python的json库,据so上的讨论和benchmark,simplejson的性能要高于jsontimeit 计算代码运行的时间等等cProfile python性能测量模块glob 类似与listfile,可以用来查找文件atexit 有一个注册函数,可用于正好在脚本退出运行前执行一些代码dis python 反汇编,当对某条语句不理解原理时,可以用dis.dis 函数来查看代码对应的python 解释器指令等等。3th libs:paramiko https://github.com/paramiko/paramiko ssh python 库selenium https://pypi.python.org/pypi/selenium 浏览器自动化测试工具selenium的python 接口lxml http://lxml.de/ python 解析html,xml 的神器mechanize https://pypi.python.org/pypi/mechanize/ Stateful programmatic web browsingpycurl https://pypi.python.org/pypi/pycurl cURL library module for PythonFabric http://docs.fabfile.org/en/1.8/ Fabric is a Python (2.5 or higher) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.xmltodict https://github.com/martinblech/xmltodict xml 转 dict,真心好用urllib3 和 requests: 当然其实requests就够了 Requests: HTTP for Humansflask http://flask.pocoo.org/python web 微框架 ipdb 调试神器,同时推荐ipython!结合ipython使用redis redis python接口pymongo mongodbpython接口PIL http://www.pythonware.com/products/pil/ python图像处理mako http://www.makotemplates.org/ python模版引擎numpy , scipy 科学计算matplotlib 画图scrapy 爬虫django/tornado/web.py/web2py/uliweb/flask/twisted/bottle/cherrypy.等等 python web框架/服务器sh 1.08 — sh v1.08 documentation 用来运行shell 模块的 极佳选择
第2个回答  2017-06-27
standard libs:itertools http://docs.python.org/2/library/itertools.htmlfunctools http://docs.python.org/2/library/functools.html 学好python有必要掌握上面这两个库吧,re 正则subprocess http://docs.python.org/2/library/subprocess.html 调用shell命令的神器pdb 调试traceback 调试pprint 漂亮的输出logging 日志threading和multiprocessing 多线程urllib/urllib2/httplib http库,httplib底层一点,推荐第三方的库requestsos/sys 系统,环境相关Queue 队列pickle/cPickle 序列化工具hashlib md5, sha等hash算法cvsjson/simplejson python的json库,据so上的讨论和benchmark,simplejson的性能要高于jsontimeit 计算代码运行的时间等等cProfile python性能测量模块glob 类似与listfile,可以用来查找文件atexit 有一个注册函数,可用于正好在脚本退出运行前执行一些代码dis python 反汇编,当对某条语句不理解原理时,可以用dis.dis 函数来查看代码对应的python 解释器指令等等。3th libs:paramiko https://github.com/paramiko/paramiko ssh python 库selenium https://pypi.python.org/pypi/selenium 浏览器自动化测试工具selenium的python 接口lxml http://lxml.de/ python 解析html,xml 的神器mechanize https://pypi.python.org/pypi/mechanize/ Stateful programmatic web browsingpycurl https://pypi.python.org/pypi/pycurl cURL library module for PythonFabric http://docs.fabfile.org/en/1.8/ Fabric is a Python (2.5 or higher) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.xmltodict https://github.com/martinblech/xmltodict xml 转 dict,真心好用urllib3 和 requests: 当然其实requests就够了 Requests: HTTP for Humansflask http://flask.pocoo.org/python web 微框架 ipdb 调试神器,同时推荐ipython!结合ipython使用redis redis python接口pymongo mongodbpython接口PIL http://www.pythonware.com/products/pil/ python图像处理mako http://www.makotemplates.org/ python模版引擎numpy , scipy 科学计算matplotlib 画图scrapy 爬虫django/tornado/web.py/web2py/uliweb/flask/twisted/bottle/cherrypy.等等 python web框架/服务器sh 1.08 — sh v1.08 documentation 用来运行shell 模块的 极佳选择
第3个回答  2017-06-27
standard libs:itertools http://docs.python.org/2/library/itertools.htmlfunctools http://docs.python.org/2/library/functools.html 学好python有必要掌握上面这两个库吧,re 正则subprocess http://docs.python.org/2/library/subprocess.html 调用shell命令的神器pdb 调试traceback 调试pprint 漂亮的输出logging 日志threading和multiprocessing 多线程urllib/urllib2/httplib http库,httplib底层一点,推荐第三方的库requestsos/sys 系统,环境相关Queue 队列pickle/cPickle 序列化工具hashlib md5, sha等hash算法cvsjson/simplejson python的json库,据so上的讨论和benchmark,simplejson的性能要高于jsontimeit 计算代码运行的时间等等cProfile python性能测量模块glob 类似与listfile,可以用来查找文件atexit 有一个注册函数,可用于正好在脚本退出运行前执行一些代码dis python 反汇编,当对某条语句不理解原理时,可以用dis.dis 函数来查看代码对应的python 解释器指令等等。3th libs:paramiko https://github.com/paramiko/paramiko ssh python 库selenium https://pypi.python.org/pypi/selenium 浏览器自动化测试工具selenium的python 接口lxml http://lxml.de/ python 解析html,xml 的神器mechanize https://pypi.python.org/pypi/mechanize/ Stateful programmatic web browsingpycurl https://pypi.python.org/pypi/pycurl cURL library module for PythonFabric http://docs.fabfile.org/en/1.8/ Fabric is a Python (2.5 or higher) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.xmltodict https://github.com/martinblech/xmltodict xml 转 dict,真心好用urllib3 和 requests: 当然其实requests就够了 Requests: HTTP for Humansflask http://flask.pocoo.org/python web 微框架 ipdb 调试神器,同时推荐ipython!结合ipython使用redis redis python接口pymongo mongodbpython接口PIL http://www.pythonware.com/products/pil/ python图像处理mako http://www.makotemplates.org/ python模版引擎numpy , scipy 科学计算matplotlib 画图scrapy 爬虫django/tornado/web.py/web2py/uliweb/flask/twisted/bottle/cherrypy.等等 python web框架/服务器sh 1.08 — sh v1.08 documentation 用来运行shell 模块的 极佳选择