標籤:

Python 常用的標準庫以及第三方庫有哪些?


只介紹我用過覺得有強烈推薦慾望的幾個

=====================標準庫

* http://docs.python.org/library/argparse.html

寫命令行腳本必備,可惜是2.7才添加的,得看具體環境了…

* http://docs.python.org/library/htmlparser.html

解析HTML DOM樹,偶爾搞搞命令行自動表單提交用得上。感覺不好用但是畢竟是官方庫

=====================第三方庫

* http://pypi.python.org/pypi/sh

簡直是系統管理神器,誰用誰知道

* http://pypi.python.org/pypi/suds

輕量的SOAP客戶端,如果貴廠內部有用SOAP介面,那這個幾乎是必須了

* http://pypi.python.org/pypi/requests

這個HTTP lib的名字叫Python HTTP for Human。用過urllib、urllib2、httplib的人,你懂的

* http://pypi.python.org/pypi/pelican

* http://pypi.python.org/pypi/Markdoc

前者是靜態博客生成器(寫markdown文本,然後自動轉換成html靜態文件),後者是文檔生成器(以前拿這個做wiki用)

* http://pypi.python.org/pypi/pep8

檢查Python腳本是否符合PEP8的style guide

* http://pypi.python.org/pypi/Pygments

語法高亮的lib,很多ruby項目用的都是這個python lib來做語法高亮的

其他想到了再補充吧


我也來幾個吧

standard libs:

  • itertools http://docs.python.org/2/library/itertools.html

  • functools 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底層一點,推薦第三方的庫requests
  • os/sys 系統,環境相關
  • Queue 隊列
  • pickle/cPickle 序列化工具
  • hashlib md5, sha等hash演算法
  • cvs
  • json/simplejson python的json庫,據so上的討論和benchmark,simplejson的性能要高於json
  • timeit 計算代碼運行的時間等等
  • 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 browsing

  • pycurl https://pypi.python.org/pypi/pycurl cURL library module for Python
  • Fabric 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 Humans
  • flask 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 模塊的 極佳選擇

暫時記得這麼多吧,不過都是我自己常用的庫 :) 。。歡迎補充

UPDATE:

A curated list of awesome Python frameworks, libraries and software.

vinta/awesome-python · GitHub

幾乎所有很贊的 python 庫,和框架都在這個列表裡。

其他的 awesome list:

bayandin/awesome-awesomeness · GitHub


我在專欄文章中寫過一篇 Python不能不知的模塊 - Python之美 - 知乎專欄,列舉了一些標準庫中一些不太出名但是都應該要掌握的模塊:

1. argparse。 用來替代optparse的命令行解析庫。如果你考慮用更直觀的,推薦docopt,它使用docstring所見即所得實現命令行解析。

2. collections。 包含了一些額外的數據類型。其中的OrderedDict(有序列的字典)、defaultdict(帶有默認值的字典)、namedtuple(通過創建帶有欄位屬性的元組子類)和deque(高效實現插入和刪除操作的雙向列表)非常常用。

3. functools。 這個模塊有一些非常有用的工具,其中的partial(偏函數)、wraps(將被包裝函數的信息拷貝過來)、total_ordering(只需要定義2個__XX__方法就可實現對象對比的類裝飾器)、cmp_to_key(將老式的比較函數轉化為關鍵字函數)非常常用。

4. glob。 文件名的shell模式匹配,你不用遍歷整個目錄判斷每個文件是不是符合,使用glob一句話就解決。

5. multiprocessing。多進程模塊。

6. os。應該是日常工作最常用的模塊了,你是否了解它裡面所有的函數和實現呢?舉個例子,獲取環境變數,我之前這樣用:

In : os.environ.get("PYTHONPATH")

讀完源碼之後我學了一招:

os.getenv("PYTHONPATH")

好吧,省了5個字元。

7. Queue。這個模塊用於多線程編程,它是一個線程安全的FIFO(先進先出)的隊列實現。如果是多進程編程,選用multiprocessing.queues中的Queue、SimpleQueue、JoinableQueue這三個隊列實現。

8. SimpleHTTPServer。最簡單地HTTP Server實現。不使用Web框架,一句:

python -m SimpleHTTPServer PORT

就可以運行起來靜態服務。平時用它預覽和下載文件太方便了。

9. subprocess。 如果你還被某些書籍引導使用os.system或者os.popen等模塊,現在是放棄它們的時候了,這個模塊會滿足你絕大多數的系統命令執行、執行結果獲取和解析等需求。其中最有用的是call(執行系統命令)、check_call(執行結果不為0則拋出異常)、check_output(最方便的獲取執行的輸出的函數)、Popen+PIPE(支持管道的多命令執行)。

10. threading。多線程模塊,重要性也不必說。

但是注意,並不是所有Python標準庫都需要很熟悉,因為有些平時用不到,有些在Python 3的時候已經廢棄。

接著說第三方的模塊,下面列幾個都是我覺得Python工程師應該知道的,剩下的看工作和個人興趣去GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resources找吧。

1. requests。人性化的HTTP請求庫,這還有不知道的么...

2. pip。Python 包和依賴關係管理工具,還有不用的么。

3. virtualenv。創建獨立 Python 環境的工具。

4. IPython。附帶非常額外功能的交互環境。

5. httpie。一個命令行HTTP 客戶端,cURL 的替代品,易用性更好。

6. you-get。一個 YouTube/Youku/Niconico 視頻下載器。

7. youtube-dl。用來下載 YouTube 視頻的工具。

8. Pillow。PIL的fork版本,操作圖像庫。

9. Cython。優化的 Python 靜態編譯器。使用類型混合使 Python 編譯成 C 或 C++ 模塊來獲得性能的極大提升。

10. pycodestyle。就是原來的pep8,幫你檢查代碼是否符合PEP8標準。

11. Flake8:靜態檢查工具,它包含PyFlakes(靜態檢查Python代碼邏輯錯誤)、pycodestyle和McCabe(分析Python代碼複雜度)三個工具。

歡迎關注本人的微信公眾號獲取更多Python相關的內容(也可以直接搜索「Python之美」):

http://weixin.qq.com/r/D0zH35LE_s_Frda89xkd (二維碼自動識別)


我來說一說我做機器學習、深度學習這一塊用到的庫吧,我是偏自然語言處理這個方向的,我主要介紹第三方庫,請使用Python3!!!請使用Python3!!!請使用Python3!!!

數學計算三件套

numpy

簡單介紹:只要涉及到數值計算,基本上三件套都會用上

鏈接:NumPy — NumPy

scipy

簡單介紹:只要涉及到數值計算,基本上三件套都會用上

鏈接:SciPy.org — SciPy.org

matplotlib

簡單介紹:只要涉及到數值計算,基本上三件套都會用上

鏈接:matplotlib: python plotting

數據處理庫

pandas

簡單介紹:讓數據能夠像excel或者r語言一樣輕鬆處理,非常高效的一個包

鏈接:Python Data Analysis Library

機器學習庫

scikit-learn

簡單介紹:非常流行的機器學習包,強烈推薦

鏈接:scikit-learn: machine learning in Python

【注意:只要安裝了anaconda,Download Anaconda Now!,以上包都會自動幫你安裝好,請使用Python3!!!請使用Python3!!!請使用Python3!!!

xgboost

簡單介紹:分類效果非常好的梯度提升樹的一個實現,很多機器學習競賽的冠軍必選包

鏈接:XGBoost Documents

自然語言處理庫

nltk

簡單介紹:很好用的自然語言處理庫,可以支持斯坦福的各種自然語言處理工具的調用

鏈接:Natural Language Toolkit

jieba

簡單介紹:非常簡單易用的中文分詞工具

鏈接:GitHub - fxsjy/jieba: 結巴中文分詞

gensim

簡單介紹:非常好用的文本模型工具包,word2vec詞向量基本上就用這個訓練

鏈接:gensim: Topic modelling for humans

資料庫連接庫

pymysql

簡單介紹:連接mysql的

鏈接:GitHub - PyMySQL/PyMySQL: Pure Python MySQL Client

深度學習庫

theano

簡單介紹:非常流行的一個深度學習庫,在學術界用的比較多

鏈接:Welcome — Theano 0.8.2 documentation

keras

簡單介紹:對theano和tensorflow的一個高層封裝,非常簡單易用,十幾行代碼就可以寫一個非常複雜的深度學習網路

鏈接:Keras Documentation

tensorflow

簡單介紹:

鏈接:https://www.tensorflow.org/

tflearn

簡單介紹:對tensorflow的一個封裝,api十分豐富,不過不支持seq2seq的模型是目前的一大遺憾

鏈接:GitHub - tflearn/tflearn: Deep learning library featuring a higher-level API for TensorFlow.

tensorlayer

簡單介紹:另一個對tensorflow的封裝,這個封裝的層次不是特別高,所以自己的可操作性更大一些,目前正在學習中

鏈接:GitHub - zsdonghao/tensorlayer: TensorLayer: A Deep Learning and Reinforcement Learning Library for TensorFlow.


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 – 一個用於把漢字轉換為拼音的庫。

Slug化

awesome-slugify – 一個 Python slug 化庫,可以保持 Unicode。

python-slugify – Python slug 化庫,可以把 unicode 轉化為 ASCII。

unicode-slugify – 一個 slug 工具,可以生成 unicode slugs ,需要依賴 Django 。

解析器

phonenumbers – 解析,格式化,儲存,驗證電話號碼。

PLY – lex 和 yacc 解析工具的 Python 實現。

Pygments – 通用語法高亮工具。

pyparsing – 生成通用解析器的框架。

python-nameparser – 把一個人名分解為幾個獨立的部分。

python-user-agents – 瀏覽器 user agent 解析器。

sqlparse – 一個無驗證的 SQL 解析器。

特殊文本格式處理

一些用來解析和操作特殊文本格式的庫。

通用

tablib – 一個用來處理中表格數據的模塊。

Office

Marmir – 把輸入的Python 數據結構轉換為電子錶單。

openpyxl – 一個用來讀寫 Excel 2010 xlsx/xlsm/xltx/xltm 文件的庫。

python-docx – 讀取,查詢以及修改 Microsoft Word 2007/2008 docx 文件。

unoconv – 在 LibreOffice/OpenOffice 支持的任意文件格式之間進行轉換。

XlsxWriter – 一個用於創建 Excel .xlsx 文件的 Python 模塊。

xlwings – 一個使得在 Excel 中方便調用 Python 的庫(反之亦然),基於 BSD 協議。

xlwt / xlrd – 讀寫 Excel 文件的數據和格式信息。

relatorio – 模板化OpenDocument 文件。

PDF

PDFMiner – 一個用於從PDF文檔中抽取信息的工具。

PyPDF2 – 一個可以分割,合併和轉換 PDF 頁面的庫。

ReportLab – 快速創建富文本 PDF 文檔。

Markdown

Mistune – 快速並且功能齊全的純 Python 實現的 Markdown 解析器。

Python-Markdown – John Gruber』s Markdown 的 Python 版實現。

YAML

PyYAML – Python 版本的 YAML 解析器。

CSV

csvkit – 用於轉換和操作 CSV 的工具。

Archive

unp – 一個用來方便解包歸檔文件的命令行工具。

自然語言處理

用來處理人類語言的庫。

NLTK – 一個先進的平台,用以構建處理人類語言數據的 Python 程序。

jieba – 中文分詞工具。

langid.py – 獨立的語言識別系統。

Pattern – Python 網路信息挖掘模塊。

SnowNLP – 一個用來處理中文文本的庫。

TextBlob – 為進行普通自然語言處理任務提供一致的 API。

TextGrocery – 一簡單高效的短文本分類工具,基於 LibLinear 和 Jieba。

文檔

用以生成項目文檔的庫。

Sphinx – Python 文檔生成器。

awesome-sphinxdoc

MkDocs – 對 Markdown 友好的文檔生成器。

pdoc – 一個可以替換Epydoc 的庫,可以自動生成 Python 庫的 API 文檔。

Pycco – 文學編程(literate-programming)風格的文檔生成器。

配置

用來保存和解析配置的庫。

config – logging 模塊作者寫的分級配置模塊。

ConfigObj – INI 文件解析器,帶驗證功能。

ConfigParser – (Python 標準庫) INI 文件解析器。

profig – 通過多種格式進行配置,具有數值轉換功能。

python-decouple – 將設置和代碼完全隔離。

命令行工具

用於創建命令行程序的庫。

命令行程序開發

cement – Python 的命令行程序框架。

click – 一個通過組合的方式來創建精美命令行界面的包。

cliff – 一個用於創建命令行程序的框架,可以創建具有多層命令的命令行程序。

clint – Python 命令行程序工具。

colorama – 跨平台彩色終端文本。

docopt – Python 風格的命令行參數解析器。

Gooey – 一條命令,將命令行程序變成一個 GUI 程序。

python-prompt-toolkit – 一個用於構建強大的互動式命令行程序的庫。

生產力工具

aws-cli – Amazon Web Services 的通用命令行界面。

bashplotlib – 在終端中進行基本繪圖。

caniusepython3 – 判斷是哪個項目妨礙你你移植到 Python 3。

cookiecutter – 從 cookiecutters(項目模板)創建項目的一個命令行工具。

doitlive – 一個用來在終端中進行現場演示的工具。

howdoi – 通過命令行獲取即時的編程問題解答。

httpie – 一個命令行HTTP 客戶端,cURL 的替代品,易用性更好。

PathPicker – 從bash輸出中選出文件。

percol – 向UNIX shell 傳統管道概念中加入互動式選擇功能。

SAWS – 一個加強版的 AWS 命令行。

thefuck – 修正你之前的命令行指令。

mycli – 一個 MySQL 命令行客戶端,具有自動補全和語法高亮功能。

pgcli – Postgres 命令行工具,具有自動補全和語法高亮功能。

下載器

用來進行下載的庫.

s3cmd – 一個用來管理Amazon S3 和 CloudFront 的命令行工具。

s4cmd – 超級 S3 命令行工具,性能更加強勁。

you-get – 一個 YouTube/Youku/Niconico 視頻下載器,使用 Python3 編寫。

youtube-dl – 一個小巧的命令行程序,用來下載 YouTube 視頻。

圖像處理

用來操作圖像的庫.

pillow – Pillow 是一個更加易用版的 PIL。

hmap – 圖像直方圖映射。

imgSeek – 一個使用視覺相似性搜索一組圖片集合的項目。

nude.py – 裸體檢測。

pyBarcode – 不藉助 PIL 庫在 Python 程序中生成條形碼。

pygram – 類似 Instagram 的圖像濾鏡。

python-qrcode – 一個純 Python 實現的二維碼生成器。

Quads – 基於四叉樹的計算機藝術。

scikit-image – 一個用於(科學)圖像處理的 Python 庫。

thumbor – 一個小型圖像服務,具有剪裁,尺寸重設和翻轉功能。

wand – MagickWand的Python 綁定。MagickWand 是 ImageMagick的 C API 。

OCR

光學字元識別庫。

pyocr – Tesseract 和 Cuneiform 的一個封裝(wrapper)。

pytesseract – Google Tesseract OCR 的另一個封裝(wrapper)。

python-tesseract – Google Tesseract OCR 的一個包裝類。

音頻

用來操作音頻的庫

audiolazy -Python 的數字信號處理包。

audioread – 交叉庫 (GStreamer + Core Audio + MAD + FFmpeg) 音頻解碼。

beets – 一個音樂庫管理工具及 MusicBrainz 標籤添加工具

dejavu – 音頻指紋提取和識別

django-elastic-transcoder – Django + Amazon Elastic Transcoder。

eyeD3 – 一個用來操作音頻文件的工具,具體來講就是包含 ID3 元信息的 MP3 文件。

id3reader – 一個用來讀取 MP3 元數據的 Python 模塊。

m3u8 – 一個用來解析 m3u8 文件的模塊。

mutagen – 一個用來處理音頻元數據的 Python 模塊。

pydub – 通過簡單、簡潔的高層介面來操作音頻文件。

pyechonest – Echo Nest API 的 Python 客戶端

talkbox – 一個用來處理演講/信號的 Python 庫

TimeSide – 開源 web 音頻處理框架。

tinytag – 一個用來讀取MP3, OGG, FLAC 以及 Wave 文件音樂元數據的庫。

mingus – 一個高級音樂理論和曲譜包,支持 MIDI 文件和回放功能。

視頻

用來操作視頻和GIF的庫。

moviepy – 一個用來進行基於腳本的視頻編輯模塊,適用於多種格式,包括動圖 GIFs。

scikit-video – SciPy 視頻處理常用程序。

地理位置

地理編碼地址以及用來處理經緯度的庫。

GeoDjango – 世界級地理圖形 web 框架。

GeoIP – MaxMind GeoIP Legacy 資料庫的 Python API。

geojson – GeoJSON 的 Python 綁定及工具。

geopy – Python 地址編碼工具箱。

pygeoip – 純 Python GeoIP API。

django-countries – 一個 Django 應用程序,提供用於表格的國家選擇功能,國旗圖標靜態文件以及模型中的國家欄位。

HTTP

使用HTTP的庫。

requests – 人性化的HTTP請求庫。

grequests – requests 庫 + gevent ,用於非同步 HTTP 請求.

httplib2 – 全面的 HTTP 客戶端庫。

treq – 類似 requests 的Python API 構建於 Twisted HTTP 客戶端之上。

urllib3 – 一個具有線程安全連接池,支持文件 post,清晰友好的 HTTP 庫。

資料庫

Python實現的資料庫。

pickleDB – 一個簡單,輕量級鍵值儲存資料庫。

PipelineDB – 流式 SQL 資料庫。

TinyDB – 一個微型的,面向文檔型資料庫。

ZODB – 一個 Python 原生對象資料庫。一個鍵值和對象圖資料庫。

資料庫驅動

用來連接和操作資料庫的庫。

MySQL – awesome-mysql系列

mysql-python – Python 的 MySQL 資料庫連接器。

mysqlclient – mysql-python 分支,支持 Python 3。

oursql – 一個更好的 MySQL 連接器,支持原生預編譯指令和 BLOBs.

PyMySQL – 純 Python MySQL 驅動,兼容 mysql-python。

PostgreSQL

psycopg2 – Python 中最流行的 PostgreSQL 適配器。

queries – psycopg2 庫的封裝,用來和 PostgreSQL 進行交互。

txpostgres – 基於 Twisted 的非同步 PostgreSQL 驅動。

其他關係型資料庫

apsw – 另一個 Python SQLite封裝。

dataset – 在資料庫中存儲Python字典 – 可以協同SQLite,MySQL,和 PostgreSQL工作。

pymssql- 一個簡單的Microsoft SQL Server資料庫介面。

NoSQL 資料庫

cassandra-python-driver – Cassandra 的 Python 驅動。

HappyBase – 一個為 Apache HBase 設計的,對開發者友好的庫。

Plyvel – 一個快速且功能豐富的 LevelDB 的 Python 介面。

py2neo – Neo4j restful 介面的Python 封裝客戶端。

pycassa – Cassandra 的 Python Thrift 驅動。

PyMongo – MongoDB 的官方 Python 客戶端。

redis-py – Redis 的 Python 客戶端。

telephus – 基於 Twisted 的 Cassandra 客戶端。

txRedis – 基於 Twisted 的 Redis 客戶端。

ORM

實現對象關係映射或數據映射技術的庫。

關係型資料庫

Django Models – Django 的一部分。

SQLAlchemy – Python SQL 工具以及對象關係映射工具。

awesome-sqlalchemy系列

Peewee – 一個小巧,富有表達力的 ORM。

PonyORM – 提供面向生成器的 SQL 介面的 ORM。

python-sql – 編寫 Python 風格的 SQL 查詢。

NoSQL 資料庫

django-mongodb-engine – Django MongoDB 後端。

PynamoDB – Amazon DynamoDB 的一個 Python 風格介面。

flywheel – Amazon DynamoDB 的對象映射工具。

MongoEngine – 一個Python 對象文檔映射工具,用於 MongoDB。

hot-redis – 為 Redis 提供 Python 豐富的數據類型。

redisco – 一個 Python 庫,提供可以持續存在在 Redis 中的簡單模型和容器。

其他

butterdb – Google Drive 電子表格的 Python ORM。

Web 框架

全棧 web 框架。

Django – Python 界最流行的 web 框架。

awesome-django系列

Flask – 一個 Python 微型框架。 https://github.com/humiaozuzu/awesome-flask系列

Pyramid – 一個小巧,快速,接地氣的開源Python web 框架。

awesome-pyramid系列

Bottle – 一個快速小巧,輕量級的 WSGI 微型 web 框架。

CherryPy – 一個極簡的 Python web 框架,服從 HTTP/1.1 協議且具有WSGI 線程池。

TurboGears – 一個可以擴展為全棧解決方案的微型框架。

web.py – 一個 Python 的 web 框架,既簡單,又強大。

web2py – 一個全棧 web 框架和平台,專註於簡單易用。

Tornado – 一個web 框架和非同步網路庫。

許可權

允許或拒絕用戶訪問數據或功能的庫。

Carteblanche – Module to align code with thoughts of users and designers. Also magically handles navigation and permissions.

django-guardian – Django 1.2+ 實現了單個對象許可權。

django-rules – 一個小巧但是強大的應用,提供對象級別的許可權管理,且不需要使用資料庫。

CMS

內容管理系統

django-cms – 一個開源的,企業級 CMS,基於 Django。

djedi-cms – 一個輕量級但卻非常強大的 Django CMS ,考慮到了插件,內聯編輯以及性能。

FeinCMS – 基於 Django 構建的最先進的內容管理系統之一。

Kotti – 一個高級的,Python 范的 web 應用框架,基於 Pyramid 構建。

Mezzanine – 一個強大的,持續的,靈活的內容管理平台。

Opps – 一個為雜誌,報紙網站以及大流量門戶網站設計的 CMS 平台,基於 Django。

Plone – 一個構建於開源應用伺服器 Zope 之上的 CMS。

Quokka – 靈活,可擴展的小型 CMS,基於 Flask 和 MongoDB。

Wagtail – 一個 Django 內容管理系統。

Widgy – 最新的 CMS 框架,基於 Django。

電子商務

用於電子商務以及支付的框架和庫。

django-oscar – 一個用於 Django 的開源的電子商務框架。

django-shop – 一個基於 Django 的店鋪系統。

Cartridge – 一個基於 Mezzanine 構建的購物車應用。

shoop – 一個基於 Django 的開源電子商務平台。

alipay – 非官方的 Python 支付寶 API。

merchant – 一個可以接收來自多種支付平台支付的 Django 應用。

money – 貨幣類庫with optional CLDR-backed locale-aware formatting and an extensible currency exchange solution.

python-currencies – 顯示貨幣格式以及它的數值。

RESTful API

用來開發RESTful APIs的庫

Django

django-rest-framework – 一個強大靈活的工具,用來構建 web API。

django-tastypie – 為Django 應用開發API。

django-formapi – 為 Django 的表單驗證,創建 JSON APIs 。

Flask

flask-api – 為 flask 開發的,可瀏覽 Web APIs 。

flask-restful – 為 flask 快速創建REST APIs 。

flask-restless – 為 SQLAlchemy 定義的資料庫模型創建 RESTful APIs 。

flask-api-utils – 為 Flask 處理 API 表示和驗證。

eve – REST API 框架,由 Flask, MongoDB 等驅動。

Pyramid

cornice – 一個Pyramid 的 REST 框架 。

與框架無關的

falcon – 一個用來建立雲 API 和 web app 後端的噶性能框架。

sandman – 為現存的資料庫驅動系統自動創建 REST APIs 。

restless – 框架無關的 REST 框架 ,基於從 Tastypie 學到的知識。

ripozo – 快速創建 REST/HATEOAS/Hypermedia APIs。

驗證

實現驗證方案的庫。

OAuth

Authomatic – 簡單但是強大的框架,身份驗證/授權客戶端。

django-allauth – Django 的驗證應用。

django-oauth-toolkit – 為 Django 用戶準備的 OAuth2。

django-oauth2-provider – 為 Django 應用提供 OAuth2 接入。

Flask-OAuthlib – OAuth 1.0/a, 2.0 客戶端實現,供 Flask 使用。

OAuthLib – 一個 OAuth 請求-簽名邏輯通用、 完整的實現。

python-oauth2 – 一個完全測試的抽象介面。用來創建 OAuth 客戶端和服務端。

python-social-auth – 一個設置簡單的社會化驗證方式。

rauth – OAuth 1.0/a, 2.0, 和 Ofly 的 Python 庫。

sanction – 一個超級簡單的OAuth2 客戶端實現。

其他

jose – JavaScript 對象簽名和加密草案的實現。

PyJWT – JSON Web 令牌草案 01。

python-jws – JSON Web 簽名草案 02 的實現。

python-jwt – 一個用來生成和驗證 JSON Web 令牌的模塊。

模板引擎

模板生成和詞法解析的庫和工具。

Jinja2 – 一個現代的,對設計師友好的模板引擎。

Chameleon – 一個 HTML/XML 模板引擎。 模仿了 ZPT(Zope Page Templates), 進行了速度上的優化。

Genshi – Python 模板工具,用以生成 web 感知的結果。

Mako – Python 平台的超高速輕量級模板。

Queue

處理事件以及任務隊列的庫。

celery – 一個非同步任務隊列/作業隊列,基於分散式消息傳遞。

huey – 小型多線程任務隊列。

mrq – Mr. Queue -一個 Python 的分散式 worker 任務隊列, 使用 Redis 和 gevent。

rq – 簡單的 Python 作業隊列。

simpleq – 一個簡單的,可無限擴張的,基於亞馬遜 SQS 的隊列。

搜索

對數據進行索引和執行搜索查詢的庫和軟體。

django-haystack – Django 模塊化搜索。

elasticsearch-py – Elasticsearch 的官方底層 Python 客戶端。

elasticsearch-dsl-py -Elasticsearch 的官方高級 Python 客戶端。

solrpy – solr的 Python 客戶端。

Whoosh – 一個快速的純 Python 搜索引擎庫。

動態消息

用來創建用戶活動的庫。

django-activity-stream – 從你的站點行為中生成通用活動信息流。

Stream-Framework – 使用 Cassandra 和 Redis 創建動態消息和通知系統。

資源管理

管理、壓縮、縮小網站資源的工具。

django-compressor – 將鏈接和內聯的 JavaScript 或 CSS 壓縮到一個單獨的緩存文件中。

django-storages – 一個針對 Django 的自定義存儲後端的工具集合。

fanstatic – 打包、優化,並且把靜態文件依賴作為 Python 的包來提供。

File Conveyor – 一個後台駐留的程序,用來發現和同步文件到 CDNs, S3 和 FTP。

Flask-Assets – 幫你將 web 資源整合到你的 Flask app 中。

jinja-assets-compressor – 一個 Jinja 擴展,用來編譯和壓縮你的資源。

webassets – 為你的靜態資源打包、優化和管理生成獨一無二的緩存 URL。

緩存

緩存數據的庫。

Beaker – 一個緩存和會話庫,可以用在 web 應用和獨立 Python腳本和應用上。

django-cache-machine – Django 模型的自動緩存和失效。

django-cacheops- 具有自動顆粒化事件驅動失效功能的 ORM。

django-viewlet – 渲染模板,同時具有額外的緩存控制功能。

dogpile.cache – dogpile.cache 是 Beaker 的下一代替代品,由同一作者開發。

HermesCache – Python 緩存庫,具有基於標籤的失效和 dogpile effect 保護功能。

johnny-cache – django應用緩存框架。

pylibmc – libmemcached 介面的 Python 封裝。

電子郵件

用來發送和解析電子郵件的庫。

django-celery-ses – 帶有 AWS SES 和 Celery 的 Django email 後端。

envelopes – 供人類使用的電子郵件庫。

flanker – 一個 email 地址和 Mime 解析庫。

imbox – Python IMAP 庫

inbox.py – Python SMTP 伺服器。

inbox – 一個開源電子郵件工具箱。

lamson – Python 風格的 SMTP 應用伺服器。

mailjet – Mailjet API 實現,用來提供批量發送郵件,統計等功能。

marrow.mailer – 高性能可擴展郵件分發框架。

modoboa – 一個郵件託管和管理平台,具有現代的、簡約的 Web UI。

pyzmail – 創建,發送和解析電子郵件。

Talon – Mailgun 庫,用來抽取信息和簽名。

國際化

用來進行國際化的庫。

Babel – 一個Python 的國際化庫。

Korean – 一個韓語詞態庫。

URL處理

解析URLs的庫

furl – 一個讓處理 URL 更簡單小型 Python 庫。

purl – 一個簡單的,不可變的URL類,具有簡潔的 API 來進行詢問和處理。

pyshorteners – 一個純 Python URL 縮短庫。

shorturl- 生成短小 URL 和類似 http://bit.ly 短鏈的Python 實現。

webargs – 一個解析 HTTP 請求參數的庫,內置對流行 web 框架的支持,包括 Flask, Django, Bottle, Tornado和 Pyramid。

HTML處理

處理 HTML和XML的庫。

BeautifulSoup – 以 Python 風格的方式來對 HTML 或 XML 進行迭代,搜索和修改。

bleach – 一個基於白名單的 HTML 清理和文本鏈接庫。

cssutils – 一個 Python 的 CSS 庫。

html5lib – 一個兼容標準的 HTML 文檔和片段解析及序列化庫。

lxml – 一個非常快速,簡單易用,功能齊全的庫,用來處理 HTML 和 XML。

MarkupSafe – 為Python 實現 XML/HTML/XHTML 標記安全字元串。

pyquery – 一個解析 HTML 的庫,類似 jQuery。

untangle – 將XML文檔轉換為Python對象,使其可以方便的訪問。

xhtml2pdf – HTML/CSS 轉 PDF 工具。

xmltodict – 像處理 JSON 一樣處理 XML。

網路站點爬取

爬取網路站點的庫

Scrapy – 一個快速高級的屏幕爬取及網頁採集框架。

cola – 一個分散式爬蟲框架。

Demiurge – 基於PyQuery 的爬蟲微型框架。

feedparser – 通用 feed 解析器。

Grab – 站點爬取框架。

MechanicalSoup – 用於自動和網路站點交互的 Python 庫。

portia – Scrapy 可視化爬取。

pyspider – 一個強大的爬蟲系統。

RoboBrowser – 一個簡單的,Python 風格的庫,用來瀏覽網站,而不需要一個獨立安裝的瀏覽器。

網頁內容提取

用於進行網頁內容提取的庫。

Haul – 一個可以擴展的圖像爬取工具。

html2text – 將 HTML 轉換為 Markdown 格式文本

lassie – 人性化的網頁內容檢索庫。

micawber -一個小型網頁內容提取庫,用來從 URLs 提取富內容。

newspaper – 使用 Python 進行新聞提取,文章提取以及內容策展。

opengraph – 一個用來解析開放內容協議(Open Graph Protocol)的 Python模塊。

python-goose – HTML內容/文章提取器。

python-readability- arc90 公司 readability 工具的 Python 高速埠

sanitize – 為雜亂的數據世界帶來調理性。

sumy – 一個為文本文件和 HTML 頁面進行自動摘要的模塊。

textract – 從任何格式的文檔中提取文本,Word,PowerPoint,PDFs 等等。

表單

進行表單操作的庫。

Deform – Python HTML 表單生成庫,受到了 formish 表單生成庫的啟發。

django-bootstrap3- 集成了 Bootstrap 3 的 Django。

django-crispy-forms – 一個 Django 應用,他可以讓你以一種非常優雅且 DRY(Don』t repeat yourself) 的方式來創建美觀的表單。

django-remote-forms- 一個平台獨立的 Django 表單序列化工具。

WTForms – 一個靈活的表單驗證和呈現庫。

WTForms-JSON- 一個 WTForms 擴展,用來處理 JSON 數據。

數據驗證

數據驗證庫。多用於表單驗證。

Cerberus – A mappings-validator with a variety of rules, normalization-features and simple customization that uses a pythonic schema-definition.

colander – 一個用於對從 XML, JSON,HTML 表單獲取的數據或其他同樣簡單的序列化數據進行驗證和反序列化的系統。

kmatch – 一種用於匹配/驗證/篩選 Python 字典的語言。

schema -一個用於對 Python 數據結構進行驗證的庫。

Schematics – 數據結構驗證。

valideer – 輕量級可擴展的數據驗證和適配庫。

voluptuous – 一個 Python 數據驗證庫。主要是為了驗證傳入 Python的 JSON,YAML 等數據。

反垃圾技術

幫助你和電子垃圾進行戰鬥的庫。

django-simple-captcha – 一個簡單、高度可定製的Django 應用,可以為任何Django表單添加驗證碼。

django-simple-spam-blocker- 一個用於Django的簡單的電子垃圾屏蔽工具。

標記

用來進行標記的庫。

django-taggit – 簡單的 Django 標記工具。

管理面板

管理界面庫。

Ajenti – 一個你的伺服器值得擁有的管理面板。

django-suit – Django 管理界面的一個替代品 (僅對於非商業用途是免費的)。

django-xadmin – Django admin 的一個替代品,具有很多不錯的功能。

flask-admin – 一個用於 Flask 的簡單可擴展的管理界面框架。

flower – 一個對 Celery 集群進行實時監控和提供 web 管理界面的工具。

Grappelli – Django 管理界面的一個漂亮的皮膚。

Wooey – 一個 Django 應用,可以為 Python 腳本創建 web 用戶界面。

靜態站點生成器

靜態站點生成器是一個軟體,它把文本和模板作為輸入,然後輸出HTML文件。

Pelican – 使用 Markdown 或 ReST 來處理內容, Jinja 2 來製作主題。支持 DVCS, Disqus.。AGPL 許可。

Cactus – 為設計師設計的靜態站點生成器。

Hyde – 基於 Jinja2 的靜態站點生成器。

Nikola – 一個靜態網站和博客生成器。

Tinkerer – Tinkerer 是一個博客引擎/靜態站點生成器,由Sphinx驅動。

Lektor – 一個簡單易用的靜態 CMS 和博客引擎。

進程

操作系統進程啟動及通信庫。

envoy – 比 Python subprocess 模塊更人性化。

sarge – 另一 種 subprocess 模塊的封裝。

sh – 一個完備的 subprocess 替代庫。

並發和並行

用以進行並發和並行操作的庫。

multiprocessing – (Python 標準庫) 基於進程的「線程」介面。

threading – (Python 標準庫)更高層的線程介面。

eventlet – 支持 WSGI 的非同步框架。

gevent – 一個基於協程的 Python 網路庫,使用greenlet。

Tomorrow -用於產生非同步代碼的神奇的裝飾器語法實現。

網路

用於網路編程的庫。

asyncio – (Python 標準庫) 非同步 I/O, 事件循環, 協程以及任務。

Twisted – 一個事件驅動的網路引擎。

pulsar – 事件驅動的並發框架。

diesel – 基於Greenlet 的事件 I/O 框架。

pyzmq – 一個 ZeroMQ 消息庫的 Python 封裝。

txZMQ – 基於 Twisted 的 ZeroMQ 消息庫的 Python 封裝。

WebSocket

幫助使用WebSocket的庫。

AutobahnPython – 給 Python 、使用的 WebSocket WAMP 基於 Twisted 和 asyncio。

Crossbar – 開源統一應用路由(Websocket WAMP for Python on Autobahn).

django-socketio – 給 Django 用的 WebSockets。

WebSocket-for-Python – 為Python2/3 以及 PyPy 編寫的 WebSocket 客戶端和伺服器庫。

WSGI 伺服器

兼容 WSGI 的 web 伺服器

gunicorn – Pre-forked, 部分是由 C 語言編寫的。

uwsgi – uwsgi 項目的目的是開發一組全棧工具,用來建立託管服務, 由 C 語言編寫。

bjoern – 非同步,非常快速,由 C 語言編寫。

fapws3 – 非同步 (僅對於網路端),由 C 語言編寫。

meinheld – 非同步,部分是由 C 語言編寫的。

netius – 非同步,非常快速。

paste – 多線程,穩定,久經考驗。

rocket – 多線程。

waitress – 多線程, 是它驅動著 Pyramid 框架。

Werkzeug – 一個 WSGI 工具庫,驅動著 Flask ,而且可以很方便大嵌入到你的項目中去。

RPC 伺服器

兼容 RPC 的伺服器。

SimpleJSONRPCServer – 這個庫是 JSON-RPC 規範的一個實現。

SimpleXMLRPCServer – (Python 標準庫) 簡單的 XML-RPC 伺服器實現,單線程。

zeroRPC – zerorpc 是一個靈活的 RPC 實現,基於 ZeroMQ 和 MessagePack。

密碼學

cryptography – 這個軟體包意在提供密碼學基本內容和方法提供給 Python 開發者。

hashids – 在 Python 中實現 hashids 。

Paramiko – SSHv2 協議的 Python (2.6+, 3.3+) ,提供客戶端和服務端的功能。

Passlib – 安全密碼存儲/哈希庫,

PyCrypto – Python 密碼學工具箱。

PyNacl – 網路和密碼學(NaCl) 庫的 Python 綁定。

圖形用戶界面

用來創建圖形用戶界面程序的庫。

curses – 內建的 ncurses 封裝,用來創建終端圖形用戶界面。

enaml – 使用類似 QML 的Declaratic語法來創建美觀的用戶界面。

kivy – 一個用來創建自然用戶交互(NUI)應用程序的庫,可以運行在 Windows, Linux, Mac OS X, Android 以及 iOS平台上。

pyglet – 一個Python 的跨平台窗口及多媒體庫。

PyQt – 跨平台用戶界面框架 Qt 的 Python 綁定 ,支持Qt v4 和 Qt v5。

PySide – P跨平台用戶界面框架 Qt 的 Python 綁定 ,支持Qt v4。

Tkinter – Tkinter 是 Python GUI 的一個事實標準庫。

Toga – 一個 Python 原生的, 操作系統原生的 GUI 工具包。

urwid – 一個用來創建終端 GUI 應用的庫,支持組件,事件和豐富的色彩等。

wxPython – wxPython 是 wxWidgets C++ 類庫和 Python 語言混合的產物。

PyGObject – GLib/GObject/GIO/GTK+ (GTK+3) 的 Python 綁定

Flexx – Flexx 是一個純 Python 語言編寫的用來創建 GUI 程序的工具集,它使用 web 技術進行界面的展示。

遊戲開發

超贊的遊戲開發庫。

Cocos2d – cocos2d 是一個用來開發 2D 遊戲, 示例和其他圖形/交互應用的框架。基於 pyglet。

Panda3D – 由迪士尼開發的 3D 遊戲引擎,並由卡內基梅隴娛樂技術中心負責維護。使用C++編寫, 針對 Python 進行了完全的封裝。

Pygame – Pygame 是一組 Python 模塊,用來編寫遊戲。

PyOgre – Ogre 3D 渲染引擎的 Python 綁定,可以用來開發遊戲和模擬程序等任何 3D 應用。

PyOpenGL – OpenGL 的 Python 綁定及其相關 APIs。

PySDL2 – SDL2 庫的封裝,基於 ctypes。

RenPy – 一個視覺小說(visual novel)引擎。

日誌

用來生成和操作日誌的庫。

logging – (Python 標準庫) 為 Python 提供日誌功能。

logbook – Logging 庫的替代品。

Eliot – 為複雜的和分散式系統創建日誌。

Raven – Sentry的 Python 客戶端。

Sentry – 實時記錄和收集日誌的伺服器。

測試

進行代碼庫測試和生成測試數據的庫。

測試框架

unittest – (Python 標準庫) 單元測試框架。

nose – nose 擴展了 unittest 的功能。

contexts – 一個 Python 3.3+ 的 BDD 框架。受到C# – Machine.Specifications的啟發。

hypothesis – Hypothesis 是一個基於先進的 Quickcheck 風格特性的測試庫。

mamba – Python 的終極測試工具, 擁護BDD。

PyAutoGUI – PyAutoGUI 是一個人性化的跨平台 GUI 自動測試模塊。

pyshould- Should 風格的斷言,基於 PyHamcrest。

pytest- 一個成熟的全功能 Python 測試工具。

green- 乾淨,多彩的測試工具。

pyvows- BDD 風格的測試工具,受Vows.js的啟發。

Robot Framework – 一個通用的自動化測試框架。

Web 測試

Selenium – Selenium WebDriver 的 Python 綁定。

locust – 使用 Python 編寫的,可擴展的用戶載入測試工具。

sixpack – 一個和語言無關的 A/B 測試框架。

splinter – 開源的 web 應用測試工具。

Mock測試

mock – (Python 標準庫) 一個用於偽造測試的庫。

doublex – Python 的一個功能強大的 doubles 測試框架。

freezegun – 通過偽造日期模塊來生成不同的時間。

httmock – 針對 Python 2.6+ 和 3.2+ 生成 偽造請求的庫。

httpretty – Python 的 HTTP 請求 mock 工具。

responses – 偽造 Python 中的 requests 庫的一個通用庫。

VCR.py – 在你的測試中記錄和重放 HTTP 交互。

對象工廠

factoryboy – 一個 Python 用的測試固件 (test fixtures) 替代庫。

mixer – 另外一個測試固件 (test fixtures) 替代庫,支持 Django, Flask, SQLAlchemy, Peewee 等。

modelmommy – 為 Django 測試創建隨機固件

代碼覆蓋率

coverage – 代碼覆蓋率測量。

偽數據

faker – 一個 Python 庫,用來生成偽數據。

fake2db – 偽資料庫生成器。

radar – 生成隨機的日期/時間。

錯誤處理

FuckIt.py – FuckIt.py 使用最先進的技術來保證你的 Python 代碼無論對錯都能繼續運行。

代碼分析和Lint工具

進行代碼分析,解析和操作代碼庫的庫和工具。

代碼分析

code2flow – 把你的 Python 和 JavaScript 代碼轉換為流程圖。

pycallgraph -這個庫可以把你的Python 應用的流程(調用圖)進行可視化。

pysonar2 – Python 類型推斷和檢索工具。

Lint工具

Flake8 – 模塊化源碼檢查工具: pep8, pyflakes 以及 co。

Pylint – 一個完全可定製的源碼分析器。

pylama – Python 和 JavaScript 的代碼審查工具。

調試工具

用來進行代碼調試的庫。

調試器

ipdb – IPython 啟用的 pdb。

pudb – 全屏,基於控制台的 Python 調試器。

pyringe – 可以在 Python 進程中附加和注入代碼的調試器。

wdb – 一個奇異的 web 調試器,通過 WebSockets 工作。

winpdb – 一個具有圖形用戶界面的 Python 調試器,可以進行遠程調試,基於 rpdb2。

django-debug-toolbar – 為 Django 顯示各種調試信息。

django-devserver – 一個 Django 運行伺服器的替代品。

flask-debugtoolbar – django-debug-toolbar 的 flask 版。

性能分析器

lineprofiler – 逐行性能分析。

memoryprofiler – 監控 Python 代碼的內存使用。

profiling – 一個互動式 Python 性能分析工具。

其他

pyelftools – 解析和分析 ELF 文件以及 DWARF 調試信息。

python-statsd – statsd 伺服器的 Python 客戶端。

科學技術和數據分析

用來進行科學計算和數據分析的庫。

astropy – 一個天文學 Python 庫。

bcbio-nextgen – 這個工具箱為全自動高通量測序分析提供符合最佳實踐的處理流程。

bccb – 生物分析相關代碼集合

Biopython – Biopython 是一組可以免費使用的用來進行生物計算的工具。

blaze – NumPy 和 Pandas 的大數據介面。

cclib – 一個用來解析和解釋計算化學軟體包輸出結果的庫。

NetworkX – 一個為複雜網路設計的高性能軟體。

Neupy – 執行和測試各種不同的人工神經網路演算法。

Numba – Python JIT (just in time) 編譯器,針對科學用的 Python ,由Cython 和 NumPy 的開發者開發。

NumPy – 使用 Python 進行科學計算的基礎包。

Open Babel – 一個化學工具箱,用來描述多種化學數據。

Open Mining – 使用 Python 挖掘商業情報 (BI) (Pandas web 介面)。

orange – 通過可視化編程或 Python 腳本進行數據挖掘,數據可視化,分析和機器學習。

Pandas – 提供高性能,易用的數據結構和數據分析工具。

PyDy – PyDy 是 Python Dynamics 的縮寫,用來為動力學運動建模工作流程提供幫助, 基於 NumPy, SciPy, IPython 和 matplotlib。

PyMC – 馬爾科夫鏈蒙特卡洛採樣工具。

RDKit – 化學信息學和機器學習軟體。

SciPy – 由一些基於 Python ,用於數學,科學和工程的開源軟體構成的生態系統。

statsmodels – 統計建模和計量經濟學。

SymPy – 一個用於符號數學的 Python 庫。

zipline – 一個 Python 演算法交易庫。

數據可視化

進行數據可視化的庫。 參見: awesome-javascript。

matplotlib – 一個 Python 2D 繪圖庫。

bokeh – 用 Python 進行互動式 web 繪圖。

ggplot – ggplot2 給 R 提供的 API 的 Python 版本。

plotly – 協同 Python 和 matplotlib 工作的 web 繪圖庫。

pygal – 一個 Python SVG 圖表創建工具。

pygraphviz – Graphviz 的 Python 介面。

PyQtGraph – 互動式實時2D/3D/圖像繪製及科學/工程學組件。

SnakeViz – 一個基於瀏覽器的 Python』s cProfile 模塊輸出結果查看工具。

vincent – 把 Python 轉換為 Vega 語法的轉換工具。

VisPy – 基於 OpenGL 的高性能科學可視化工具。

計算機視覺

計算機視覺庫。

OpenCV – 開源計算機視覺庫。

SimpleCV – 一個用來創建計算機視覺應用的開源框架。

機器學習

機器學習庫。 參見: awesome-machine-learning.

Crab – 靈活、快速的推薦引擎。

gensim – 人性化的話題建模庫。

hebel – GPU 加速的深度學習庫。

NuPIC – 智能計算 Numenta 平台。

pattern – Python 網路挖掘模塊。

PyBrain – 另一個 Python 機器學習庫。

Pylearn2 – 一個基於 Theano 的機器學習庫。

python-recsys – 一個用來實現推薦系統的 Python 庫。

scikit-learn – 基於 SciPy 構建的機器學習 Python 模塊。

pydeep – Python 深度學習庫。

vowpalporpoise – 輕量級 Vowpal Wabbit 的 Python 封裝。

skflow – 一個 TensorFlow 的簡化介面(模仿 scikit-learn)。

MapReduce

MapReduce 框架和庫。

dpark – Spark 的 Python 克隆版,一個類似 MapReduce 的框架。

dumbo – 這個 Python 模塊可以讓人輕鬆的編寫和運行 Hadoop 程序。

luigi – 這個模塊幫你構建批處理作業的複雜流水線。

mrjob – 在 Hadoop 或 Amazon Web Services 上運行 MapReduce 任務。

PySpark – Spark 的 Python API 。

streamparse – 運行針對事實數據流的 Python 代碼。集成了Apache Storm。

函數式編程

使用 Python 進行函數式編程。

CyToolz – Toolz 的 Cython 實現 : 高性能函數式工具。

fn.py – 在 Python 中進行函數式編程 : 實現了一些享受函數式編程缺失的功能。

funcy – 炫酷又實用的函數式工具。

Toolz – 一組用於迭代器,函數和字典的函數式編程工具。

第三方 API

用來訪問第三方 API的庫。 參見: List of Python API Wrappers and Libraries。

apache-libcloud – 一個為各種雲設計的 Python 庫。

boto – Amazon Web Services 的 Python 介面。

django-wordpress – WordPress models and views for Django.

facebook-sdk – Facebook 平台的 Python SDK.

facepy – Facepy 讓和 Facebook』s Graph API 的交互變得更容易。

gmail – Gmail 的 Python 介面。

google-api-python-client – Python 用的 Google APIs 客戶端庫。

gspread – Google 電子表格的 Python API.

twython – Twitter API 的封裝。

DevOps 工具

用於 DevOps 的軟體和庫。

Ansible – 一個非常簡單的 IT 自動化平台。

SaltStack – 基礎設施自動化和管理系統。

OpenStack – 用於構建私有和公有雲的開源軟體。

Docker Compose – 快速,分離的開發環境,使用 Docker。

Fabric – 一個簡單的,Python 風格的工具,用來進行遠程執行和部署。

cuisine – 為 Fabric 提供一系列高級函數。

Fabtools – 一個用來編寫超贊的 Fabric 文件的工具。

gitapi – Git 的純 Python API。

hgapi – Mercurial 的純 Python API。

honcho – Foreman的 Python 克隆版,用來管理基於Procfile的應用。

pexpect – Controlling interactive programs in a pseudo-terminal like 在一個偽終端中控制交互程序,就像 GNU expect 一樣。

psutil – 一個跨平台進程和系統工具模塊。

supervisor – UNIX 的進程式控制制系統。

任務調度

任務調度庫。

APScheduler – 輕巧但強大的進程內任務調度,使你可以調度函數。

django-schedule – 一個 Django 排程應用。

doit – 一個任務執行和構建工具。

gunnery – 分散式系統使用的多用途任務執行工具 ,具有 web 交互界面。

Joblib – 一組為 Python 提供輕量級作業流水線的工具。

Plan – 如有神助地編寫 crontab 文件。

schedule – 人性化的 Python 任務調度庫。

Spiff – 使用純 Python 實現的強大的工作流引擎。

TaskFlow – 一個可以讓你方便執行任務的 Python 庫,一致並且可靠。

外來函數介面

使用外來函數介面的庫。

cffi – 用來調用 C 代碼的外來函數介面。

ctypes – (Python 標準庫) 用來調用 C 代碼的外來函數介面。

PyCUDA – Nvidia CUDA API 的封裝。

SWIG – 簡化的封裝和介面生成器。

高性能

讓 Python 更快的庫。

Cython – 優化的 Python 靜態編譯器。使用類型混合使 Python 編譯成 C 或 C++ 模塊來獲得性能的極大提升。

PeachPy – 嵌入 Python 的 x86-64 彙編器。可以被用作 Python 內聯的彙編器或者是獨立的彙編器,用於 Windows, Linux, OS X, Native Client 或者 Go 。

PyPy – 使用 Python 實現的 Python。解釋器使用黑魔法加快 Python 運行速度且不需要加入額外的類型信息。

Pyston – 使用 LLVM 和現代 JIT 技術構建的 Python 實現,目標是為了獲得很好的性能。

Stackless Python – 一個強化版的 Python。

微軟的 Windows平台

在 Windows 平台上進行 Python 編程。

Python(x,y) – 面向科學應用的 Python 發行版,基於 Qt 和 Spyder。

pythonlibs – 非官方的 Windows 平台 Python 擴展二進位包。

PythonNet – Python 與 .NET 公共語言運行庫 (CLR)的集成。

PyWin32 – 針對 Windows 的Python 擴展。

WinPython – Windows 7/8 系統下攜帶型開發環境。

網路可視化和SDN

用來進行網路可視化和SDN(軟體定義網路)的工具和庫。

Mininet – 一款流行的網路模擬器以及用 Python 編寫的 API。

POX – 一個針對基於 Python 的軟體定義網路應用(例如 OpenFlow SDN 控制器)的開源開發平台。

Pyretic – 火熱的 SDN 編程語言中的一員,為網路交換機和模擬器提供強大的抽象能力。

SDX Platform – 基於 SDN 的 IXP 實現,影響了 Mininet, POX 和 Pyretic。

硬體

用來對硬體進行編程的庫。

ino -操作Arduino的命令行工具。

Pyro – Python 機器人編程庫。

PyUserInput – 跨平台的,控制滑鼠和鍵盤的模塊。

scapy – 一個非常棒的操作數據包的庫。

wifi – 一個 Python 庫和命令行工具用來在 Linux 平台上操作WiFi。

Pingo – Pingo 為類似Raspberry Pi,pcDuino, Intel Galileo等設備提供統一的API用以編程。

兼容性

幫助從 Python 2 向 Python 3遷移的庫。

Python-Future – 這就是 Python 2 和 Python 3 之間丟失的那個兼容性層。

Python-Modernize – 使 Python 代碼更加現代化以便最終遷移到 Python 3。

Six – Python 2 和 3 的兼容性工具。

雜項

不屬於上面任何一個類別,但是非常有用的庫。

blinker – 一個快速的 Python 進程內信號/事件分發系統。

itsdangerous – 一系列輔助工具用來將可信的數據傳入不可信的環境。

pluginbase – 一個簡單但是非常靈活的 Python 插件系統。

Pychievements – 一個用來創建和追蹤成就的 Python 框架。

Tryton – 一個通用商務框架。

演算法和設計模式

Python 實現的演算法和設計模式。

algorithms -一個 Python 演算法模塊

python-patterns – Python 設計模式的集合。

sortedcontainers – 快速,純 Python 實現的SortedList,SortedDict 和 SortedSet 類型。

編輯器插件

編輯器和 IDE 的插件

Emacs

Elpy – Emacs Python 開發環境。

Sublime Text

SublimeJEDI – 一個 Sublime Text 插件,用來使用超贊的自動補全庫 Jedi。

Anaconda – Anaconda 把你的 Sublime Text 3 變成一個功能齊全的 Python IDE。

Vim

YouCompleteMe – 引入基於 Jedi 的 Python 自動補全引擎。

Jedi-vim – 綁定 Vim 和 Jedi 自動補全庫對 Python 進行自動補全。

Python-mode – 將 Vim 變成 Python IDE 的一款多合一插件。

Visual Studio

PTVS – Visual Studio 的 Python 工具

集成開發環境

流行的 Python 集成開發環境。

PyCharm – 商業化的 Python IDE ,由 JetBrains 開發。也有免費的社區版提供。

LiClipse – 基於 Eclipse 的免費多語言 IDE 。使用 PyDev 來支持 Python 。

Spyder – 開源 Python IDE。

服務

在線工具和簡化開發的 API 。

持續集成

參見: awesome-CIandCD.

Travis CI – 一個流行的工具,為你的開源和私人項目提供持續集成服務。(僅支持 GitHub)

CircleCI – 一個持續集成工具,可以非常快速的進行並行測試。 (僅支持 GitHub)

Vexor CI – 一個為私人 app 提供持續集成的工具,支持按分鐘付費。

Wercker – 基於 Docker 平台,用來構建和部署微服務。

代碼質量

Codacy – 自動化代碼審查,更加快速的發布高質量代碼。對於開源項目是免費的。

QuantifiedCode – 一個數據驅動、自動、持續的代碼審查工具。

資源

在這裡可以找到新的 Python 庫。

網站

r/Python

CoolGithubProjects

Django Packages

Full Stack Python

Python 3 Wall of Superpowers

Python Hackers

Python ZEEF

Trending Python repositories on GitHub today

PyPI Ranking

周刊

Import Python Newsletter

Pycoder』s Weekly

Python Weekly

Twitter

@codetengu

@getpy

@planetpython

@pycoders

@pypi

@pythontrending

@PythonWeekly


原生:

系統調用的subprocess

多線程的multiprocessing

第三方:

系統管理推薦fabric和salt

WEB框架推薦flask和tornado

ORM推薦SQLAlchemy


一個memo: https://github.com/fengsp/easy-python

或者直接: http://easy-python.readthedocs.org/


工作和學習過程中收集了一些庫:Python 模塊收集 | Huoty"s Blog


Python資源大全 去這個地方看看,Python常用模塊基本都包括啦,而且還有很多學校資料


功能型的都是各取所需 就說些好用的吧

Tornado: 和其他Python框架的架構可謂大相徑庭,Request的處理方式也很舒服,特別適合REST,誰用誰知道

Mako: 個人認為是最好的Template,簡單 性能好

SQLAlchemy: 快一統ORM了吧

Quixote:其實還是蠻好用的

pyQuery: 用jQuery的語法寫爬蟲 略爽

gevent。。。。。


20 Python libraries you can"t live without

By Yasoob ?

wordpress.com ? July 30, 2013

Hi there fellas. Today i am going to list 20 python libraries which have been a part of my toolbelt and should be a part of yours as well. So here they are:

1.Requests. The most famous http library written by kenneth reitz. It』s a must have for every python developer.

2.Scrapy. If you are involved in webscraping then this is a must have library for you. After using this library you won』t use any other.

3.wxPython. A gui toolkit for python. I have primarily used it in place of tkinter. You will really love it.

4.Pillow. A friendly fork of PIL (Python Imaging Library). It is more user friendly than PIL and is a must have for anyone who works with images.

5.SQLAlchemy. A database library. Many love it and many hate it. The choice is yours.

6.BeautifulSoup. I know it』s slow but this xml and html parsing library is very useful for beginners.

7.Twisted. The most important tool for any network application developer. It has a very beautiful api and is used by a lot of famous python developers.

8.NumPy. How can we leave this very important library ? It provides some advance math functionalities to python.

9.SciPy. When we talk about NumPy then we have to talk about scipy. It is a library of algorithms and mathematical tools for python and has caused many scientists to switch from ruby to python.

10.matplotlib. A numerical plotting library. It is very useful for any data scientist or any data analyzer.

11.Pygame. Which developer does not like to play games and develop them ? This library will help you achieve your goal of 2d game development.

12.Pyglet. A 3d animation and game creation engine. This is the engine in which the famous python port of minecraft was made

13.pyQT. A GUI toolkit for python. It is my second choice after wxpython for developing GUI』s for my python scripts.

14.pyGtk. Another python GUI library. It is the same library in which the famous Bittorrent client is created.

15.Scapy. A packet sniffer and analyzer for python made in python.

16.pywin32. A python library which provides some useful methods and classes for interacting with windows.

17.nltk. Natural Language Toolkit – I realize most people won』t be using this one, but it』s generic enough. It is a very useful library if you want to manipulate strings. But it』s capacity is beyond that. Do check it out.

18.nose. A testing framework for python. It is used by millions of python developers. It is a must have if you do test driven development.

19.SymPy. SymPy can do algebraic evaluation, differentiation, expansion, complex numbers, etc. It is contained in a pure Python distribution.

20.IPython. I just can』t stress enough how useful this tool is. It is a python prompt on steroids. It has completion, history, shell capabilities, and a lot more. Make sure that you take a look at it.

https://freepythontips.wordpress.com/2013/07/30/20-python-libraries-you-cant-live-without/


GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resources

GitHub - jobbole/awesome-python-cn: Python資源大全中文版,內容包括:Web框架、網路爬蟲、網路內容提取、模板引擎、資料庫、數據可視化、圖片處理、文本處理、自然語言處理、機器學習、日誌、代碼分析等參考這個項目python-awesome。企業級開發或者個人玩玩都能滿足需求。

另外,搜索flask-awesome或者vim-awesome同樣有驚喜。

A curated list of awesome Python frameworks, libraries, software and resources.

Inspired by awesome-php.

  • Awesome Python
    • Environment Management
    • Package Management
    • Package Repositories
    • Distribution
    • Build Tools
    • Interactive Interpreter
    • Files
    • Date and Time
    • Text Processing
    • Specific Formats Processing
    • Natural Language Processing
    • Documentation
    • Configuration
    • Command-line Tools
    • Downloader
    • Imagery
    • OCR
    • Audio
    • Video
    • Geolocation
    • HTTP
    • Database
    • Database Drivers
    • ORM
    • Web Frameworks
    • Serverless Frameworks
    • Permissions
    • CMS
    • E-commerce
    • RESTful API
    • Serialization
    • Authentication
    • Template Engine
    • Queue
    • Search
    • News Feed
    • Asset Management
    • Caching
    • Email
    • Internationalization
    • URL Manipulation
    • HTML Manipulation
    • Web Crawling
    • Web Content Extracting
    • Forms
    • Data Validation
    • Anti-spam
    • Tagging
    • Admin Panels
    • Static Site Generator
    • Processes
    • Concurrency and Parallelism
    • Networking
    • WebSocket
    • WSGI Servers
    • RPC Servers
    • Cryptography
    • GUI
    • Game Development
    • Logging
    • Testing
    • Code Analysis and Linter
    • Debugging Tools
    • Science and Data Analysis
    • Data Visualization
    • Computer Vision
    • Machine Learning
    • Functional Programming
    • MapReduce
    • Third-party APIs
    • DevOps Tools
    • ChatOps Tools
    • Job Scheduler
    • Foreign Function Interface
    • High Performance
    • Network Virtualization and SDN
    • Hardware
    • Compatibility
    • Miscellaneous
    • Algorithms and Design Patterns
    • Editor Plugins
    • IDEs
  • Services
    • Continuous Integration
    • Code Quality
  • Resources
    • Websites
    • Weekly
    • Twitter
  • Other Awesome Lists
  • Contributing

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesEnvironment Management

Libraries for Python version and environment management.

  • p - Dead simple interactive Python version management.
  • pyenv - Simple Python version management.
  • venv - (Python standard library in Python 3.3+) Creating lightweight virtual environments.
  • virtualenv - A tool to create isolated Python environments.
  • virtualenvwrapper - A set of extensions to virtualenv.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesPackage Management

Libraries for package and dependency management.

  • pip - The Python package and dependency manager.
    • Python Package Index
  • pip-tools - A set of tools to keep your pinned Python dependencies fresh.
  • conda - Cross-platform, Python-agnostic binary package manager.
  • Curdling - Curdling is a command line tool for managing Python packages.
  • wheel - The new standard of Python distribution and are intended to replace eggs.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesPackage Repositories

Local PyPI repository server and proxies.

  • warehouse - Next generation Python Package Repository (PyPI).
    • Warehouse
  • bandersnatch - PyPI mirroring tool provided by Python Packaging Authority (PyPA).
  • devpi - PyPI server and packaging/testing/release tool.
  • localshop - Local PyPI server (custom packages and auto-mirroring of pypi).

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesDistribution

Libraries to create packaged executables for release distribution.

  • PyInstaller - Converts Python programs into stand-alone executables (cross-platform).
  • dh-virtualenv - Build and distribute a virtualenv as a Debian package.
  • Nuitka - Compile scripts, modules, packages to an executable or extension module.
  • py2app - Freezes Python scripts (Mac OS X).
  • py2exe - Freezes Python scripts (Windows).
  • pynsist - A tool to build Windows installers, installers bundle Python itself.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesBuild Tools

Compile software from source code.

  • buildout - A build system for creating, assembling and deploying applications from multiple parts.
  • BitBake - A make-like build tool for embedded Linux.
  • PlatformIO - A console tool to build code with different development platforms.
  • PyBuilder - A continuous build tool written in pure Python.
  • SCons - A software construction tool.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesInteractive Interpreter

Interactive Python interpreters (REPL).

  • Jupyter Notebook (IPython) - A rich toolkit to help you make the most out of using Python interactively.
  • bpython – A fancy interface to the Python interpreter.
  • ptpython - Advanced Python REPL built on top of the python-prompt-toolkit.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesFiles

Libraries for file manipulation and MIME type detection.

  • imghdr - (Python standard library) Determine the type of an image.
  • mimetypes - (Python standard library) Map filenames to MIME types.
  • path.py - A module wrapper for os.path.
  • pathlib - (Python standard library in Python 3.4+) An cross-platform, object-oriented path library.
  • python-magic - A Python interface to the libmagic file type identification library.
  • Unipath - An object-oriented approach to file/directory operations.
  • watchdog - API and shell utilities to monitor file system events.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesDate and Time

Libraries for working with dates and times.

  • arrow - Better dates times for Python.
  • Chronyk - A Python 3 library for parsing human-written times and dates.
  • dateutil - Extensions to the standard Python datetime module.
  • delorean - A library for clearing up the inconvenient truths that arise dealing with datetimes.
  • moment - A Python library for dealing with dates/times. Inspired by Moment.js.
  • PyTime - A easy-use Python module which aims to operate date/time/datetime by string.
  • pytz - World timezone definitions, modern and historical. Brings the tz database into Python.
  • when.py - Providing user-friendly functions to help perform common date and time actions.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesText Processing

Libraries for parsing and manipulating plain texts.

  • General
    • chardet - Python 2/3 compatible character encoding detector.
    • difflib - (Python standard library) Helpers for computing deltas.
    • ftfy - Makes Unicode text less broken and more consistent automagically.
    • fuzzywuzzy - Fuzzy String Matching.
    • Levenshtein - Fast computation of Levenshtein distance and string similarity.
    • pangu.py - Spacing texts for CJK and alphanumerics.
    • pyfiglet - An implementation of figlet written in Python.
    • shortuuid - A generator library for concise, unambiguous and URL-safe UUIDs.
    • unidecode - ASCII transliterations of Unicode text.
    • uniout - Print readable chars instead of the escaped string.
    • xpinyin - A library to translate Chinese hanzi (漢字) to pinyin (拼音).
  • Slugify
    • awesome-slugify - A Python slugify library that can preserve unicode.
    • python-slugify - A Python slugify library that translates unicode to ASCII.
    • unicode-slugify - A slugifier that generates unicode slugs with Django as a dependency.
  • Parser
    • phonenumbers - Parsing, formatting, storing and validating international phone numbers.
    • PLY - Implementation of lex and yacc parsing tools for Python
    • Pygments - A generic syntax highlighter.
    • pyparsing - A general purpose framework for generating parsers.
    • python-nameparser - Parsing human names into their individual components.
    • python-user-agents - Browser user agent parser.
    • sqlparse - A non-validating SQL parser.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesSpecific Formats Processing

Libraries for parsing and manipulating specific text formats.

  • General
    • tablib - A module for Tabular Datasets in XLS, CSV, JSON, YAML.
  • Office
    • Marmir - Takes Python data structures and turns them into spreadsheets.
    • openpyxl - A library for reading and writing Excel 2010 xlsx/xlsm/xltx/xltm files.
    • pyexcel - Providing one API for reading, manipulating and writing csv, ods, xls, xlsx and xlsm files.
    • python-docx - Reads, queries and modifies Microsoft Word 2007/2008 docx files.
    • relatorio - Templating OpenDocument files.
    • unoconv - Convert between any document format supported by LibreOffice/OpenOffice.
    • XlsxWriter - A Python module for creating Excel .xlsx files.
    • xlwings - A BSD-licensed library that makes it easy to call Python from Excel and vice versa.
    • xlwt / xlrd - Writing and reading data and formatting information from Excel files.
  • PDF
    • PDFMiner - A tool for extracting information from PDF documents.
    • PyPDF2 - A library capable of splitting, merging and transforming PDF pages.
    • ReportLab - Allowing Rapid creation of rich PDF documents.
  • Markdown
    • Mistune - Fastest and full featured pure Python parsers of Markdown.
    • Python-Markdown - A Python implementation of John Gruber』s Markdown.
  • YAML
    • PyYAML - YAML implementations for Python.
  • CSV
    • csvkit - Utilities for converting to and working with CSV.
  • Archive
    • unp - A command line tool that can unpack archives easily.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesNatural Language Processing

Libraries for working with human languages.

  • NLTK - A leading platform for building Python programs to work with human language data.
  • Pattern - A web mining module for the Python.
  • Jieba - Chinese text segmentation.
  • SnowNLP - A library for processing Chinese text.
  • spaCy - A library for industrial-strength natural language processing in Python and Cython.
  • TextBlob - Providing a consistent API for diving into common NLP tasks.
  • TextGrocery - A simple, efficient short-text classification tool based on LibLinear and Jieba.
  • langid.py - Stand-alone language identification system.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesDocumentation

Libraries for generating project documentation.

  • Sphinx - Python Documentation generator.
    • awesome-sphinxdoc
  • MkDocs - Markdown friendly documentation generator.
  • pdoc - Epydoc replacement to auto generate API documentation for Python libraries.
  • Pycco - The literate-programming-style documentation generator.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesConfiguration

Libraries for storing and parsing configuration options.

  • config - Hierarchical config from the author of logging.
  • ConfigObj - INI file parser with validation.
  • ConfigParser - (Python standard library) INI file parser.
  • profig - Config from multiple formats with value conversion.
  • python-decouple - Strict separation of settings from code.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesCommand-line Tools

Libraries for building command-line application.

  • Command-line Application Development
    • asciimatics - Cross-platform, full-screen terminal package (i.e. mouse/keyboard input and coloured, positioned text output) complete with high-level API for complex animations and special effects.
    • cement - CLI Application Framework for Python.
    • click - A package for creating beautiful command line interfaces in a composable way.
    • cliff - A framework for creating command-line programs with multi-level commands.
    • clint - Python Command-line Application Tools.
    • colorama - Cross-platform colored terminal text.
    • docopt - Pythonic command line arguments parser.
    • Gooey - Turn command line programs into a full GUI application with one line
    • python-prompt-toolkit - A Library for building powerful interactive command lines.
  • Productivity Tools
    • aws-cli - A universal command-line interface for Amazon Web Services.
    • bashplotlib - Making basic plots in the terminal.
    • caniusepython3 - Determine what projects are blocking you from porting to Python 3.
    • cookiecutter - A command-line utility that creates projects from cookiecutters (project templates).
    • doitlive - A tool for live presentations in the terminal.
    • howdoi - Instant coding answers via the command line.
    • httpie - A command line HTTP client, a user-friendly cURL replacement.
    • PathPicker - Select files out of bash output.
    • percol - Adds flavor of interactive selection to the traditional pipe concept on UNIX.
    • SAWS - A Supercharged AWS CLI.
    • thefuck - Correcting your previous console command.
    • try - A dead simple CLI to try out python packages - It"s never been easier.
    • mycli - A Terminal Client for MySQL with AutoCompletion and Syntax Highlighting.
    • pgcli - Postgres CLI with autocompletion and syntax highlighting.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesDownloader

Libraries for downloading.

  • s3cmd - A command line tool for managing Amazon S3 and CloudFront.
  • s4cmd - Super S3 command line tool, good for higher performance.
  • you-get - A YouTube/Youku/Niconico video downloader written in Python 3.
  • youtube-dl - A small command-line program to download videos from YouTube.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesImagery

Libraries for manipulating images.

  • pillow - Pillow is the friendly PIL fork.
  • hmap - Image histogram remapping.
  • imgSeek - A project for searching a collection of images using visual similarity.
  • nude.py - Nudity detection.
  • pyBarcode - Create barcodes in Python without needing PIL.
  • pygram - Instagram-like image filters.
  • python-qrcode - A pure Python QR Code generator.
  • Quads - Computer art based on quadtrees.
  • scikit-image - A Python library for (scientific) image processing.
  • thumbor - A smart imaging service. It enables on-demand crop, re-sizing and flipping of images.
  • wand - Python bindings for MagickWand, C API for ImageMagick.

OCR

Libraries for Optical Character Recognition.

  • pyocr - A wrapper for Tesseract and Cuneiform.
  • pytesseract - Another wrapper for Google Tesseract OCR.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesAudio

Libraries for manipulating audio.

  • audiolazy - Expressive Digital Signal Processing (DSP) package for Python.
  • audioread - Cross-library (GStreamer + Core Audio + MAD + FFmpeg) audio decoding.
  • beets - A music library manager and MusicBrainz tagger.
  • dejavu - Audio fingerprinting and recognition.
  • django-elastic-transcoder - Django + Amazon Elastic Transcoder.
  • eyeD3 - A tool for working with audio files, specifically MP3 files containing ID3 metadata.
  • id3reader - A Python module for reading MP3 meta data.
  • m3u8 - A module for parsing m3u8 file.
  • mutagen - A Python module to handle audio metadata.
  • pydub - Manipulate audio with a simple and easy high level interface.
  • pyechonest - Python client for the Echo Nest API.
  • talkbox - A Python library for speech/signal processing.
  • TimeSide - Open web audio processing framework.
  • tinytag - A library for reading music meta data of MP3, OGG, FLAC and Wave files.
  • mingus - An advanced music theory and notation package with MIDI file and playback support.

GitHub - vinta/awesome-python: A curated list of awesome Python frameworks, libraries, software and resourcesVideo

Libraries for manipulating video and GIFs.

  • moviepy - A module for script-based movie editing with many formats, including animated GIFs.
  • scikit-video - Video processing routines for SciPy.

Geolocation

Libraries for geocoding addresses and working with latitudes and longitudes.

  • GeoDjango - A world-class geographic web framework.
  • GeoIP - Python API for MaxMind GeoIP Legacy Database.
  • geojson - Python bindings and utilities for GeoJSON.
  • geopy - Python Geocoding Toolbox.
  • pygeoip - Pure Python GeoIP API.
  • django-countries - A Django app that provides country choices for use with forms, flag icons static files, and a country field for models.

HTTP

Libraries for working with HTTP.

  • requests - HTTP Requests for Humans?.
  • grequests - requests + gevent for asynchronous HTTP requests.
  • httplib2 - Comprehensive HTTP client library.
  • treq - Python requests like API built on top of Twisted"s HTTP client.
  • urllib3 - A HTTP library with thread-safe connection pooling, file post support, sanity friendly.

Database

Databases implemented in Python.

  • pickleDB - A simple and lightweight key-value store for Python.
  • PipelineDB - The Streaming SQL Database.
  • TinyDB - A tiny, document-oriented database.
  • ZODB - A native object database for Python. A key-value and object graph database.

Database Drivers

Libraries for connecting and operating databases.

  • MySQL - awesome-mysql
    • mysql-python - The MySQL database connector for Python.
    • mysqlclient - mysql-python fork supporting Python 3.
    • oursql - A better MySQL connector with support for native prepared statements and BLOBs.
    • PyMySQL - Pure Python MySQL driver compatible to mysql-python.
  • PostgreSQL
    • psycopg2 - The most popular PostgreSQL adapter for Python.
    • queries - A wrapper of the psycopg2 library for interacting with PostgreSQL.
    • txpostgres - Twisted based asynchronous driver for PostgreSQL.
  • Other Relational Databases
    • apsw - Another Python SQLite wrapper.
    • dataset - Store Python dicts in a database - works with SQLite, MySQL, and PostgreSQL.
    • pymssql - A simple database interface to Microsoft SQL Server.
  • NoSQL Databases
    • cassandra-python-driver - Python driver for Cassandra.
    • HappyBase - A developer-friendly library for Apache HBase.
    • Plyvel - A fast and feature-rich Python interface to LevelDB.
    • py2neo - Python wrapper client for Neo4j"s restful interface.
    • pycassa - Python Thrift driver for Cassandra.
    • PyMongo - The official Python client for MongoDB.
    • redis-py - The Redis Python Client.
    • telephus - Twisted based client for Cassandra.
    • txRedis - Twisted based client for Redis.

ORM

Libraries that implement Object-Relational Mapping or data mapping techniques.

  • Relational Databases
    • Django Models - A part of Django.
    • SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper.
      • awesome-sqlalchemy
    • Peewee - A small, expressive ORM.
    • PonyORM - ORM that provides a generator-oriented interface to SQL.
    • python-sql - Write SQL queries pythonically.
  • NoSQL Databases
    • django-mongodb-engine - Django MongoDB Backend.
    • PynamoDB - A Pythonic interface for Amazon DynamoDB.
    • flywheel - Object mapper for Amazon DynamoDB.
    • MongoEngine - A Python Object-Document-Mapper for working with MongoDB.
    • hot-redis - Rich Python data types for Redis.
    • redisco - A Python Library for Simple Models and Containers Persisted in Redis.
  • Others
    • butterdb - A Python ORM for Google Drive Spreadsheets.

Web Frameworks

Full stack web frameworks.

  • Django - The most popular web framework in Python.
    • awesome-django
  • Flask - A microframework for Python.
    • awesome-flask
  • Pyramid - A small, fast, down-to-earth, open source Python web framework.
    • awesome-pyramid
  • Bottle - A fast, simple and lightweight WSGI micro web-framework.
  • CherryPy - A minimalist Python web framework, HTTP/1.1-compliant and WSGI thread-pooled.
  • TurboGears - A microframework that can scale up to a full stack solution.
  • web.py - A web framework for Python that is as simple as it is powerful.
  • web2py - A full stack web framework and platform focused in the ease of use.
  • Tornado - A Web framework and asynchronous networking library.

Serverless Frameworks

Frameworks for developing serverless Python code.

  • apex - Build, deploy, and manage AWS Lambda functions with ease.
  • Zappa - A tool for deploying WSGI applications on AWS Lambda and API Gateway.
  • python-lambda - A toolkit for developing and deploying Python code in AWS Lambda.

Permissions

Libraries that allow or deny users access to data or functionality.

  • Carteblanche - Module to align code with thoughts of users and designers. Also magically handles navigation and permissions.
  • django-guardian - Implementation of per object permissions for Django 1.2+
  • django-rules - A tiny but powerful app providing object-level permissions to Django, without requiring a database.

CMS

Content Management Systems.

  • django-cms - An Open source enterprise CMS based on the Django.
  • djedi-cms - A lightweight but yet powerful Django CMS with plugins, inline editing and performance in mind.
  • FeinCMS - One of the most advanced Content Management Systems built on Django.
  • Kotti - A high-level, Pythonic web application framework built on Pyramid.
  • Mezzanine - A powerful, consistent, and flexible content management platform.
  • Opps - A Django-based CMS for magazines, newspapers websites and portals with high-traffic.
  • Plone - A CMS built on top of the open source application server Zope.
  • Quokka - Flexible, extensible, small CMS powered by Flask and MongoDB.
  • Wagtail - A Django content management system.
  • Widgy - Last CMS framework, based on Django.

E-commerce

Frameworks and libraries for e-commerce and payments.

  • django-oscar - An open-source e-commerce framework for Django.
  • django-shop - A Django based shop system.
  • Cartridge - A shopping cart app built using the Mezzanine.
  • shoop - An open source E-Commerce platform based on Django.
  • alipay - Unofficial Alipay API for Python.
  • merchant - A Django app to accept payments from various payment processors.
  • money - Money class with optional CLDR-backed locale-aware formatting and an extensible currency exchange solution.
  • python-currencies - Display money format and its filthy currencies.

RESTful API

Libraries for developing RESTful APIs.

  • Django
    • django-rest-framework - A powerful and flexible toolkit to build web APIs.
    • django-tastypie - Creating delicious APIs for Django apps.
    • django-formapi - Create JSON APIs with Django"s form validation.
  • Flask
    • flask-api - Browsable Web APIs for Flask.
    • flask-restful - Quickly building REST APIs for Flask.
    • flask-restless - Generating RESTful APIs for database models defined with SQLAlchemy.
    • flask-api-utils - Taking care of API representation and authentication for Flask.
    • eve - REST API framework powered by Flask, MongoDB and good intentions.
  • Pyramid
    • cornice - A RESTful framework for Pyramid.
  • Framework agnostic
    • falcon - A high-performance framework for building cloud APIs and web app backends.
    • hug - A Python3 framework for cleanly exposing APIs over HTTP and the Command Line with automatic documentation and validation.
    • sandman - Automated REST APIs for existing database-driven systems.
    • restless - Framework agnostic REST framework based on lessons learned from Tastypie.
    • ripozo - Quickly creating REST/HATEOAS/Hypermedia APIs.

Serialization

Libraries for serializing complex data types

  • marshmallow - marshmallow is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes.

Authentication

Libraries for implementing authentications schemes.

  • OAuth
    • Authomatic - Simple but powerful framework agnostic authentication/authorization client.
    • django-allauth - Authentication app for Django that "just works."
    • django-oauth-toolkit - OAuth2 goodies for the Djangonauts.
    • django-oauth2-provider - Providing OAuth2 access to Django app.
    • Flask-OAuthlib - OAuth 1.0/a, 2.0 implementation of client and provider for Flask.
    • OAuthLib - A generic and thorough implementation of the OAuth request-signing logic.
    • python-oauth2 - A fully tested, abstract interface to creating OAuth clients and servers.
    • python-social-auth - An easy-to-setup social authentication mechanism.
    • rauth - A Python library for OAuth 1.0/a, 2.0, and Ofly.
    • sanction - A dead simple OAuth2 client implementation.
  • Others
    • jose - JavaScript Object Signing and Encryption draft implementation.
    • PyJWT - Implementation of the JSON Web Token draft 01.
    • python-jws - Implementation of JSON Web Signatures draft 02.
    • python-jwt - Module for generating and verifying JSON Web Tokens.

Template Engine

Libraries and tools for templating and lexing.

  • Jinja2 - A modern and designer friendly templating language.
  • Genshi - Python templating toolkit for generation of web-aware output.
  • Mako - Hyperfast and lightweight templating for the Python platform.

Queue

Libraries for working with event and task queues.

  • celery - An asynchronous task queue/job queue based on distributed message passing.
  • huey - Little multi-threaded task queue.
  • mrq - Mr. Queue - A distributed worker task queue in Python using Redis gevent.
  • rq - Simple job queues for Python.
  • simpleq - A simple, infinitely scalable, Amazon SQS based queue.

Search

Libraries and software for indexing and performing search queries on data.

  • django-haystack - Modular search for Django.
  • elasticsearch-py - The official low-level Python client for Elasticsearch.
  • elasticsearch-dsl-py - The official high-level Python client for Elasticsearch.
  • esengine - ElasticSearch ODM (Object Document Mapper) for Python.
  • solrpy - A Python client for solr.
  • Whoosh - A fast, pure Python search engine library.

News Feed

Libraries for building user"s activities.

  • django-activity-stream - Generating generic activity streams from the actions on your site.
  • Stream-Framework - Building newsfeed and notification systems using Cassandra and Redis.

Asset Management

Tools for managing, compressing and minifying website assets.

  • django-compressor - Compresses linked and inline JavaScript or CSS into a single cached file.
  • django-pipeline - An asset packaging library for Django.
  • django-storages - A collection of custom storage back ends for Django.
  • fanstatic - Packages, optimizes, and serves static file dependencies as Python packages.
  • fileconveyor - A daemon to detect and sync files to CDNs, S3 and FTP.
  • flask-assets - Helps you integrate webassets into your Flask app.
  • jinja-assets-compressor - A Jinja extension to compile and compress your assets.
  • webassets - Bundles, optimizes, and manages unique cache-busting URLs for static resources.

Caching

Libraries for caching data.

  • Beaker - A library for caching and sessions for use with web applications and stand-alone Python scripts and applications.
  • django-cache-machine - Automatic caching and invalidation for Django models.
  • django-cacheops - A slick ORM cache with automatic granular event-driven invalidation.
  • django-viewlet - Render template parts with extended cache control.
  • dogpile.cache - dogpile.cache is next generation replacement for Beaker made by same authors.
  • HermesCache - Python caching library with tag-based invalidation and dogpile effect prevention.
  • johnny-cache - A caching framework for django applications.
  • pylibmc - A Python wrapper around the libmemcached interface.
  • DiskCache - SQLite and file backed cache backend with faster lookups than memcached and redis.

Email

Libraries for sending and parsing email.

  • envelopes - Mailing for human beings.
  • flanker - A email address and Mime parsing library.
  • imbox - Python IMAP for Humans.
  • inbox.py - Python SMTP Server for Humans.
  • lamson - Pythonic SMTP Application Server.
  • Marrow Mailer - High-performance extensible mail delivery framework.
  • modoboa - A mail hosting and management platform including a modern and simplified Web UI.
  • Nylas Sync Engine - Providing a RESTful API on top of a powerful email sync platform.
  • yagmail - Yet another Gmail/SMTP client.

Internationalization

Libraries for working with i18n.

  • Babel - An internationalization library for Python.
  • PyICU - A wrapper of International Components for Unicode C++ library (ICU).

URL Manipulation

Libraries for parsing URLs.

  • furl - A small Python library that makes manipulating URLs simple.
  • purl - A simple, immutable URL class with a clean API for interrogation and manipulation.
  • pyshorteners - A pure Python URL shortening lib.
  • short_url - Python implementation for generating Tiny URL and bit.ly-like URLs.
  • webargs - A friendly library for parsing HTTP request arguments, with built-in support for popular web frameworks, including Flask, Django, Bottle, Tornado, and Pyramid.

HTML Manipulation

Libraries for working with HTML and XML.

  • BeautifulSoup - Providing Pythonic idioms for iterating, searching, and modifying HTML or XML.
  • bleach - A whitelist-based HTML sanitization and text linkification library.
  • cssutils - A CSS library for Python.
  • html5lib - A standards-compliant library for parsing and serializing HTML documents and fragments.
  • lxml - A very fast, easy-to-use and versatile library for handling HTML and XML.
  • MarkupSafe - Implements a XML/HTML/XHTML Markup safe string for Python.
  • pyquery - A jQuery-like library for parsing HTML.
  • untangle - Converts XML documents to Python objects for easy access.
  • xhtml2pdf - HTML/CSS to PDF converter.
  • xmltodict - Working with XML feel like you are working with JSON.

Web Crawling

Libraries for scraping websites.

  • Scrapy - A fast high-level screen scraping and web crawling framework.
  • cola - A distributed crawling framework.
  • Demiurge - PyQuery-based scraping micro-framework.
  • feedparser - Universal feed parser.
  • Grab - Site scraping framework.
  • MechanicalSoup - A Python library for automating interaction with websites.
  • portia - Visual scraping for Scrapy.
  • pyspider - A powerful spider system.
  • RoboBrowser - A simple, Pythonic library for browsing the web without a standalone web browser.

Web Content Extracting

Libraries for extracting web contents.

  • Haul - An Extensible Image Crawler.
  • html2text - Convert HTML to Markdown-formatted text.
  • lassie - Web Content Retrieval for Humans.
  • micawber - A small library for extracting rich content from URLs.
  • newspaper - News extraction, article extraction and content curation in Python.
  • opengraph - A Python module to parse the Open Graph Protocol
  • python-goose - HTML Content/Article Extractor.
  • python-readability - Fast Python port of arc90"s readability tool.
  • sanitize - Bringing sanity to world of messed-up data.
  • sumy - A module for automatic summarization of text documents and HTML pages.
  • textract - Extract text from any document, Word, PowerPoint, PDFs, etc.

Forms

Libraries for working with forms.

  • Deform - Python HTML form generation library influenced by the formish form generation library.
  • django-bootstrap3 - Bootstrap 3 integration with Django.
  • django-crispy-forms - A Django app which lets you create beautiful forms in a very elegant and DRY way.
  • django-remote-forms - A platform independent Django form serializer.
  • WTForms - A flexible forms validation and rendering library.

Data Validation

Libraries for validating data. Used for forms in many cases.

  • Schematics - Data Structure Validation.
  • schema - A library for validating Python data structures.
  • jsonschema - An implementation of JSON Schema for Python.
  • Cerberus - A lightweight and extensible data validation library.
  • colander - Validating and deserializing data obtained via XML, JSON, an HTML form post.
  • voluptuous - A Python data validation library.
  • valideer - Lightweight extensible data validation and adaptation library.

Anti-spam

Libraries for fighting spam.

  • django-simple-captcha - A simple and highly customizable Django app to add captcha images to any Django form.
  • django-simple-spam-blocker - Simple spam blocker for Django.

Tagging

Libraries for tagging items.

  • django-taggit - Simple tagging for Django.

Admin Panels

Libraries for administrative interfaces.

  • Ajenti - The admin panel your servers deserve.
  • django-suit - Alternative Django Admin-Interface (free only for Non-commercial use).
  • django-xadmin - Drop-in replacement of Django admin comes with lots of goodies.
  • flask-admin - Simple and extensible administrative interface framework for Flask.
  • flower - Real-time monitor and web admin for Celery.
  • Grappelli – A jazzy skin for the Django Admin-Interface.
  • Wooey - A Django app which creates automatic web UIs for Python scripts.

Static Site Generator

Static site generator is a software that takes some text + templates as input and produces HTML files on the output.

  • Pelican - Uses Markdown or ReST for content and Jinja 2 for themes. Supports DVCS, Disqus. AGPL.
  • Cactus – Static site generator for designers.
  • Hyde - Jinja2-based static web site generator.
  • Nikola - A static website and blog generator.
  • Tinkerer - Tinkerer is a blogging engine/.static website generator powered by Sphinx.
  • Lektor - An easy to use static CMS and blog engine.

Processes

Libraries for starting and communicating with OS processes.

  • envoy - Python subprocess for Humans?.
  • sarge - Yet another wrapper for subprocess.
  • sh - A full-fledged subprocess replacement for Python.

Concurrency and Parallelism

Libraries for concurrent and parallel execution.

  • multiprocessing - (Python standard library) Process-based "threading" interface.
  • threading - (Python standard library) Higher-level threading interface.
  • eventlet - Asynchronous framework with WSGI support.
  • gevent - A coroutine-based Python networking library that uses greenlet.
  • Tomorrow - Magic decorator syntax for asynchronous code.

Networking

Libraries for networking programming.

  • asyncio - (Python standard library) Asynchronous I/O, event loop, coroutines and tasks.
  • Twisted - An event-driven networking engine.
  • pulsar - Event-driven concurrent framework for Python.
  • diesel - Greenlet-based event I/O Framework for Python.
  • pyzmq - A Python wrapper for the ZeroMQ message library.
  • txZMQ - Twisted based wrapper for the ZeroMQ message library.

WebSocket

Libraries for working with WebSocket.

  • AutobahnPython - WebSocket WAMP for Python on Twisted and asyncio.
  • Crossbar - Open-source Unified Application Router (Websocket WAMP for Python on Autobahn).
  • django-socketio - WebSockets for Django.
  • WebSocket-for-Python - WebSocket client and server library for Python 2 and 3 as well as PyPy.

WSGI Servers

WSGI-compatible web servers.

  • gunicorn - Pre-forked, partly written in C.
  • uwsgi - A project aims at developing a full stack for building hosting services, written in C.
  • bjoern - Asynchronous, very fast and written in C.
  • fapws3 - Asynchronous (network side only), written in C.
  • meinheld - Asynchronous, partly written in C.
  • netius - Asynchronous, very fast.
  • paste - Multi-threaded, stable, tried and tested.
  • rocket - Multi-threaded.
  • waitress - Multi-threaded, poweres Pyramid.
  • Werkzeug - A WSGI utility library for Python that powers Flask and can easily be embedded into your own projects.

RPC Servers

RPC-compatible servers.

  • SimpleJSONRPCServer - This library is an implementation of the JSON-RPC specification.
  • SimpleXMLRPCServer - (Python standard library) Simple XML-RPC server implementation, single-threaded.
  • zeroRPC - zerorpc is a flexible RPC implementation based on ZeroMQ and MessagePack.

Cryptography

  • cryptography - A package designed to expose cryptographic primitives and recipes to Python developers.
  • hashids - Implementation of hashids in Python.
  • Paramiko - A Python (2.6+, 3.3+) implementation of the SSHv2 protocol, providing both client and server functionality.
  • Passlib - Secure password storage/hashing library, very high level.
  • PyCrypto - The Python Cryptography Toolkit.
  • PyNacl - Python binding to the Networking and Cryptography (NaCl) library.

GUI

Libraries for working with graphical user interface applications.

  • curses - Built-in wrapper for ncurses used to create terminal GUI applications.
  • enaml - Creating beautiful user-interfaces with Declaratic Syntax like QML.
  • kivy - A library for creating NUI applications, running on Windows, Linux, Mac OS X, Android and iOS.
  • pyglet - A cross-platform windowing and multimedia library for Python.
  • PyQt - Python bindings for the Qt cross-platform application and UI framework, with support for both Qt v4 and Qt v5 frameworks.
  • PySide - Python bindings for the Qt cross-platform application and UI framework, supporting the Qt v4 framework.
  • Tkinter - Tkinter is Python"s de-facto standard GUI package.
  • Toga - A Python native, OS native GUI toolkit.
  • urwid - A library for creating terminal GUI applications with strong support for widgets, events, rich colors, etc.
  • wxPython - A blending of the wxWidgets C++ class library with the Python.
  • PyGObject - Python Bindings for GLib/GObject/GIO/GTK+ (GTK+3)
  • Flexx - Flexx is a pure Python toolkit for creating GUI"s, that uses web technology for its rendering.

Game Development

Awesome game development libraries.

  • Cocos2d - cocos2d is a framework for building 2D games, demos, and other graphical/interactive applications. It is based on pyglet.
  • Panda3D - 3D game engine developed by Disney and maintained by Carnegie Mellon"s Entertainment Technology Center. Written in C++, completely wrapped in Python.
  • Pygame - Pygame is a set of Python modules designed for writing games.
  • PyOgre - Python bindings for the Ogre 3D render engine, can be used for games, simulations, anything 3D.
  • PyOpenGL - Python ctypes bindings for OpenGL and it"s related APIs.
  • PySDL2 - A ctypes based wrapper for the SDL2 library.
  • RenPy - A Visual Novel engine.

Logging

Libraries for generating and working with logs.

  • logging - (Python standard library) Logging facility for Python.
  • logbook - Logging replacement for Python.
  • Eliot - Logging for complex distributed systems.
  • Raven - The Python client for Sentry.
  • Sentry - A realtime logging and aggregation server.

Testing

Libraries for testing codebases and generating test data.

  • Testing Frameworks
    • unittest - (Python standard library) Unit testing framework.
    • nose - A nicer unittest for Python.
    • pytest - A mature full-featured Python testing tool.
    • hypothesis - Hypothesis is an advanced Quickcheck style property based testing library.
    • mamba - The definitive testing tool for Python. Born under the banner of BDD.
    • Robot Framework - A generic test automation framework.
  • Test Runners
    • tox - Auto builds and tests distributions in multiple Python versions
    • green - A clean, colorful test runner.
  • GUI / Web Testing
    • Selenium - Python bindings for Selenium WebDriver.
    • locust - Scalable user load testing tool written in Python.
    • sixpack - A language-agnostic A/B Testing framework.
    • splinter - Open source tool for testing web applications.
    • PyAutoGUI - PyAutoGUI is a cross-platform GUI automation Python module for human beings.
  • Mock
    • mock - (Python standard library) A mocking and patching library.
    • doublex - Powerful test doubles framework for Python.
    • freezegun - Travel through time by mocking the datetime module.
    • httmock - A mocking library for requests for Python 2.6+ and 3.2+.
    • httpretty - HTTP request mock tool for Python.
    • responses - A utility library for mocking out the requests Python library.
    • VCR.py - Record and replay HTTP interactions on your tests.
  • Object Factories
    • factory_boy - A test fixtures replacement for Python.
    • mixer - Another fixtures replacement. Supported Django, Flask, SQLAlchemy, Peewee and etc.
    • model_mommy - Creating random fixtures for testing in Django.
  • Code Coverage
    • coverage - Code coverage measurement.
  • Fake Data
    • faker - A Python package that generates fake data.
    • fake2db - Fake database generator.
    • radar - Generate random datetime / time.
  • Error Handler
    • FuckIt.py - FuckIt.py uses state-of-the-art technology to make sure your Python code runs whether it has any right to or not.

Code Analysis and Linter

Libraries and tools for analysing, parsing and manipulation codebases.

  • Code Analysis
    • code2flow - Turn your Python and JavaScript code into DOT flowcharts.
    • pycallgraph - A library that visualises the flow (call graph) of your Python application.
    • pysonar2 - A type inferencer and indexer for Python.
    • coala - Language independent and easily extendable code analysis application.
  • Linter
    • Flake8 - The modular source code checker: pep8, pyflakes and co.
    • Pylint - A Fully customizable source code analyzer.
    • pylama - Code audit tool for Python and JavaScript.

Debugging Tools

Libraries for debugging code.

  • Debugger
    • ipdb - IPython-enabled pdb.
    • pudb – A full-screen, console-based Python debugger.
    • pyringe - Debugger capable of attaching to and injecting code into Python processes.
    • wdb - An improbable web debugger through WebSockets.
    • winpdb - A Python Debugger with GUI, capable of remote debugging based on rpdb2.
    • django-debug-toolbar - Display various debug information for Django.
    • django-devserver - A drop-in replacement for Django"s runserver.
    • flask-debugtoolbar - A port of the django-debug-toolbar to flask.
  • Profiler
    • line_profiler - Line-by-line profiling.
    • memory_profiler - Monitor Memory usage of Python code.
    • profiling - An interactive Python profiler.
  • Others
    • pyelftools - Parsing and analyzing ELF files and DWARF debugging information.
    • python-statsd - Python Client for the statsd server.

Science and Data Analysis

Libraries for scientific computing and data analyzing.

  • astropy - A community Python library for Astronomy.
  • bcbio-nextgen - A toolkit providing best-practice pipelines for fully automated high throughput sequencing analysis.
  • bccb - Collection of useful code related to biological analysis.
  • Biopython - Biopython is a set of freely available tools for biological computation.
  • blaze - NumPy and Pandas interface to Big Data.
  • cclib - A library for parsing and interpreting the results of computational chemistry packages.
  • NetworkX - A high-productivity software for complex networks.
  • Neupy - Running and testing different Artificial Neural Networks algorithms.
  • NIPY - A collection of neuroimaging toolkits.
  • Numba - Python JIT (just in time) complier to LLVM aimed at scientific Python by the developers of Cython and NumPy.
  • NumPy - A fundamental package for scientific computing with Python.
  • Open Babel - A chemical toolbox designed to speak the many languages of chemical data.
  • Open Mining - Business Intelligence (BI) in Python (Pandas web interface)
  • orange - Data mining, data visualization, analysis and machine learning through visual programming or Python scripting.
  • Pandas - A library providing high-performance, easy-to-use data structures and data analysis tools.
  • PyDy - Short for Python Dynamics, used to assist with workflow in the modeling of dynamic motion based around NumPy, SciPy, IPython, and matplotlib.
  • PyMC - Markov Chain Monte Carlo sampling toolkit.
  • RDKit - Cheminformatics and Machine Learning Software.
  • SciPy - A Python-based ecosystem of open-source software for mathematics, science, and engineering.
  • statsmodels - Statistical modeling and econometrics in Python.
  • SymPy - A Python library for symbolic mathematics.
  • zipline - A Pythonic algorithmic trading library.

Data Visualization

Libraries for visualizing data. See: awesome-javascript.

  • matplotlib - A Python 2D plotting library.
  • bokeh - Interactive Web Plotting for Python.
  • ggplot - Same API as ggplot2 for R.
  • plotly - Collaborative web plotting for Python and matplotlib.
  • pygal - A Python SVG Charts Creator.
  • pygraphviz - Python interface to Graphviz.
  • PyQtGraph - Interactive and realtime 2D/3D/Image plotting and science/engineering widgets.
  • SnakeViz - A browser based graphical viewer for the output of Python"s cProfile module.
  • vincent - A Python to Vega translator.
  • VisPy - High-performance scientific visualization based on OpenGL.

Computer Vision

Libraries for computer vision.

  • OpenCV - Open Source Computer Vision Library.
  • SimpleCV - An open source framework for building computer vision applications.

Machine Learning

Libraries for Machine Learning. See: awesome-machine-learning.

  • Crab - A ?exible, fast recommender engine.
  • gensim - Topic Modelling for Humans.
  • hebel - GPU-Accelerated Deep Learning Library in Python.
  • NuPIC - Numenta Platform for Intelligent Computing.
  • pattern - Web mining module for Python.
  • PyBrain - Another Python Machine Learning Library.
  • Pylearn2 - A Machine Learning library based on Theano.
  • python-recsys - A Python library for implementing a Recommender System.
  • scikit-learn - A Python module for machine learning built on top of SciPy.
  • pydeep - Deep learning in python
  • vowpal_porpoise - A lightweight Python wrapper for Vowpal Wabbit.
  • skflow - A simplified interface for TensorFlow (mimicking scikit-learn).

MapReduce

Frameworks and libraries for MapReduce.

  • dpark - Python clone of Spark, a MapReduce alike framework in Python.
  • dumbo - Python module that allows one to easily write and run Hadoop programs.
  • luigi - A module that helps you build complex pipelines of batch jobs.
  • mrjob - Run MapReduce jobs on Hadoop or Amazon Web Services.
  • PySpark - The Spark Python API.
  • streamparse - Run Python code against real-time streams of data. Integrates with Apache Storm.

Functional Programming

Functional Programming with Python.

  • CyToolz - Cython implementation of Toolz: High performance functional utilities.
  • fn.py - Functional programming in Python: implementation of missing features to enjoy FP.
  • funcy - A fancy and practical functional tools.
  • Toolz - A collection of functional utilities for iterators, functions, and dictionaries.

Third-party APIs

Libraries for accessing third party services APIs. See: List of Python API Wrappers and Libraries.

  • apache-libcloud - One Python library for all clouds.
  • boto - Python interface to Amazon Web Services.
  • django-wordpress - WordPress models and views for Django.
  • facebook-sdk - Facebook Platform Python SDK.
  • facepy - Facepy makes it really easy to interact with Facebook"s Graph API
  • gmail - A Pythonic interface for Gmail.
  • google-api-python-client - Google APIs Client Library for Python.
  • gspread - Google Spreadsheets Python API.
  • twython - A Python wrapper for the Twitter API.

DevOps Tools

Software and libraries for DevOps.

  • Ansible - A radically simple IT automation platform.
  • SaltStack - Infrastructure automation and management system.
  • OpenStack - Open source software for building private and public clouds.
  • Docker Compose - Fast, isolated development environments using Docker.
  • Cloud-Init - A multi-distribution package that handles early initialization of a cloud instance.
  • cuisine - Chef-like functionality for Fabric.
  • Fabric - A simple, Pythonic tool for remote execution and deployment.
  • Fabtools - Tools for writing awesome Fabric files.
  • honcho - A Python clone of Foreman, for managing Procfile-based applications.
  • pexpect - Controlling interactive programs in a pseudo-terminal like GNU expect.
  • psutil - A cross-platform process and system utilities module.
  • supervisor - Supervisor process control system for UNIX.

ChatOps Tools

Libraries for chatbot development.

  • Errbot - The easiest and most popular chatbot to implement ChatOps.

Job Scheduler

Libraries for scheduling jobs.

  • APScheduler - A light but powerful in-process task scheduler that lets you schedule functions.
  • django-schedule - A calendaring app for Django.
  • doit - A task runner and build tool.
  • gunnery - Multipurpose task execution tool for distributed systems with web-based interface.
  • Joblib - A set of tools to provide lightweight pipelining in Python.
  • Plan - Writing crontab file in Python like a charm.
  • schedule - Python job scheduling for humans.
  • Spiff - A powerful workflow engine implemented in pure Python.
  • TaskFlow - A Python library that helps to make task execution easy, consistent and reliable.

Foreign Function Interface

Libraries for providing foreign function interface.

  • cffi - Foreign Function Interface for Python calling C code.
  • ctypes - (Python standard library) Foreign Function Interface for Python calling C code.
  • PyCUDA - A Python wrapper for Nvidia"s CUDA API.
  • SWIG - Simplified Wrapper and Interface Generator.

High Performance

Libraries for making Python faster.

  • Cython - Optimizing Static Compiler for Python. Uses type mixins to compile Python into C or C++ modules resulting in large performance gains.
  • PeachPy - x86-64 assembler embedded in Python. Can be used as inline assembler for Python or as a stand-alone assembler for Windows, Linux, OS X, Native Client and Go.
  • PyPy - An implementation of Python in Python. The interpreter uses black magic to make Python very fast without having to add in additional type information.
  • Pyston - A Python implementation built using LLVM and modern JIT techniques with the goal of achieving good performance.
  • Stackless Python - An enhanced version of the Python.

Microsoft Windows

Python programming on Microsoft Windows.

  • Python(x,y) - Scientific-applications-oriented Python Distribution based on Qt and Spyder.
  • pythonlibs - Unofficial Windows binaries for Python extension packages.
  • PythonNet - Python Integration with the .NET Common Language Runtime (CLR).
  • PyWin32 - Python Extensions for Windows.
  • WinPython - Portable development environment for Windows 7/8.

Network Virtualization and SDN

Tools and libraries for Virtual Networking and SDN (Software Defined Networking).

  • Mininet - A popular network emulator and API written in Python.
  • POX - An open source development platform for Python-based Software Defined Networking (SDN) control applications, such as OpenFlow SDN controllers.
  • Pyretic - A member of the Frenetic family of SDN programming languages that provides powerful abstractions over network switches or emulators.
  • SDX Platform - SDN based IXP implementation that leverages Mininet, POX and Pyretic.

Hardware

Libraries for programming with hardware.

  • ino - Command line toolkit for working with Arduino.
  • Pyro - Python Robotics.
  • PyUserInput - A module for cross-platform control of the mouse and keyboard.
  • scapy - A brilliant packet manipulation library.
  • wifi - A Python library and command line tool for working with WiFi on Linux.
  • Pingo - Pingo provides a uniform API to program devices like the Raspberry Pi, pcDuino, Intel Galileo, etc.

Compatibility

Libraries for migrating from Python 2 to 3.

  • Python-Future - The missing compatibility layer between Python 2 and Python 3.
  • Python-Modernize - Modernizes Python code for eventual Python 3 migration.
  • Six - Python 2 and 3 compatibility utilities.

Miscellaneous

Useful libraries or tools that don"t fit in the categories above.

  • blinker - A fast Python in-process signal/event dispatching system.
  • itsdangerous - Various helpers to pass trusted data to untrusted environments.
  • pluginbase - A simple but flexible plugin system for Python.
  • Pychievements - A framework for creating and tracking achievements.
  • Tryton - A general purpose business framework.

Algorithms and Design Patterns

Python implementation of algorithms and design patterns.

  • algorithms - A module of algorithms for Python.
  • python-patterns - A collection of design patterns in Python.
  • sortedcontainers - Fast, pure-Python implementation of SortedList, SortedDict, and SortedSet types.

Editor Plugins

Plugins for editors and IDEs.

  • Emacs
    • Elpy - Emacs Python Development Environment.
  • Sublime Text
    • SublimeJEDI - A Sublime Text plugin to the awesome auto-complete library Jedi.
    • Anaconda - Anaconda turns your Sublime Text 3 in a full featured Python development IDE.
  • Vim
    • YouCompleteMe - Includes Jedi-based completion engine for Python.
    • Jedi-vim - Vim bindings for the Jedi auto-completion library for Python.
    • Python-mode - An all in one plugin for turning Vim into a Python IDE.
  • Visual Studio
    • PTVS - Python Tools for Visual Studio.

IDEs

Popular Python IDEs.

  • PyCharm - Commercial Python IDE by JetBrains. Has free community edition available.
  • LiClipse - Free polyglot IDE based on Eclipse. Uses PyDev for Python support.
  • Spyder - Open Source Python IDE.

Services

Online tools and APIs to simplify development.

Continuous Integration

See: awesome-CIandCD.

  • Travis CI - A popular CI service for your open source and private projects. (GitHub only)
  • CircleCI - A CI service that can run very fast parallel testing. (GitHub only)
  • Vexor CI - A continuous integration tool for private apps with pay-per-minute billing model.
  • Wercker - A Docker-based platform for building and deploying applications and microservices.

Code Quality

  • Codecov - Code coverage dashboard.
  • Codacy - Automated Code Review to ship better code, faster. Free for Open Source.
  • Landscape - Hosted continuous Python code metrics.
  • QuantifiedCode - A data-driven, automated, continuous code review tool.

Resources

Where to discover new Python libraries.

Websites

  • r/Python
  • CoolGithubProjects
  • Django Packages
  • Full Stack Python
  • Python 3 Wall of Superpowers
  • Python Hackers
  • Python ZEEF
  • Trending Python repositories on GitHub today
  • PyPI Ranking
  • Awesome Python @LibHunt

Weekly

  • CodeTengu Weekly
  • Import Python Newsletter
  • Pycoder"s Weekly
  • Python Weekly

Twitter

  • @codetengu
  • @getpy
  • @importpython
  • @planetpython
  • @pycoders
  • @pypi
  • @pythontrending
  • @PythonWeekly

Other Awesome Lists

List of lists.

  • Python
    • pycrumbs
    • python-github-projects
    • python_reference
    • pythonidae
  • Monty
    • awesome
    • lists


requests 好用的讓人想哭


推薦兩個 BeautifulSoup 和 IMage


awesome python

(這個答案夠簡潔嗎)

逃)


個人認為,anaconda裡面的庫,足夠你用了,再不行官網下個直接裝上完事,所以說沒有什麼常用庫的說法,自己工程需要什麼,報錯後再裝,完事


並發庫: gevent, 將一個個小功能用greenlet實現,然後通過queue, AsyncResult通信來進行解耦,起碼解決我現在遇到的大部分業務流程問題,而且擴展性超好。


python 常用庫

標準庫

* os, sys

* argparse

* configparser

* subprocess

* threading

* json, re

* logging, traceback

* collections, functools

* http, wsgi

* unittest

第三方庫

* requests

* sqlalchemy

* paramiko

* webob, routes, paste, eventlet

* flask, django

* scrapy

* numpy, scipy, matplotlib, pandas, scikit-learn, nltk


圖像處理:

PIL 需要用pip安裝

PILLOW 對PIL的bug修正,算是第三方。

如果需要讀取圖片exif,可使用exifread


sklearn


多線程和多進程multiprocessing

網路庫requests

隊列Queue


我也來說兩個:

操作系統相關的os庫

python程序本身相關的sys庫

配置文件解析的ConfigParser庫

redis python客戶端pyredis

另外還有itertool,subprocess等

web框架:web.py flask django


msgpack序列化庫


推薦閱讀:

python有哪些數據分析和數據展現的模塊可以用?
下載了rqalpha源代碼,不知道如何用ipython直接在源代碼中調試運行。?
如何制定python學習計劃?
如何閱讀goagent的代碼?
Python中Turtle模塊的基本指令都有哪些?

TAG:Python |