50個很棒的Python模塊,包含幾乎所有的需要:比如Databases,GUIs,Images, Sound, OS interaction, Web,以及其他。推薦收藏。
Graphical interfacewxPythonhttp://wxpython.org
Graphical interfacepyGtkhttp://www.pygtk.org
Graphical interfacepyQThttp://www.riverbankcomputing.co.uk/pyqt/
Graphical interfacePmwhttp://pmw.sourceforge.net/
Graphical interfaceTkinter 3000http://effbot.org/zone/wck.htm
Graphical interfaceTixhttp://tix.sourceforge.net/
DatabaseMySQLdbhttp://sourceforge.net/projects/mysql-python
DatabasePyGreSQLhttp://www.pygresql.org/
DatabaseGadflyhttp://gadfly.sourceforge.net/
DatabaseSQLAlchemyhttp://www.sqlalchemy.org/
Databasepsycopghttp://www.initd.org/pub/software/psycopg/
Databasekinterbasdbhttp://kinterbasdb.sourceforge.net/
Databasecx_Oraclehttp://www.cxtools.net/default.aspx?nav=downloads
DatabasepySQLitehttp://initd.org/tracker/pysqlite
MSN Messengermsnlibhttp://auriga.wearlab.de/~alb/msnlib/
MSN Messengerpymsnhttp://telepathy.freedesktop.org/wiki/Pymsn
MSN Messengermsnphttp://msnp.sourceforge.net/
NetworkTwistedhttp://twistedmatrix.com/
ImagesPILhttp://www.pythonware.com/products/pil/
Imagesgdmodulehttp://newcenturycomputers.net/projects/gdmodule.html
ImagesVideoCapturehttp://videocapture.sourceforge.net/
Sciences and Mathsscipyhttp://www.scipy.org/
Sciences and MathsNumPyhttp://numpy.scipy.org//
Sciences and Mathsnumarrayhttp://www.stsci.edu/resources/software_hardware/numarray
Sciences and Mathsmatplotlibhttp://matplotlib.sourceforge.net/
GamesPygamehttp://www.pygame.org/news.html
GamesPyglethttp://www.pyglet.org/
GamesPySoyhttp://www.pysoy.org/
GamespyOpenGLhttp://pyopengl.sourceforge.net/
Jabberjabberpyhttp://jabberpy.sourceforge.net/
Webscrapehttp://zesty.ca/python/scrape.html
WebBeautiful Souphttp://crummy.com/software/BeautifulSoup
Webpythonwebhttp://www.pythonweb.org/
Webmechanizehttp://wwwsearch.sourceforge.net/mechanize/
Localisationgeoname.pyhttp://www.zindep.com/blog-zindep/Geoname-python/
Serial portpySerialhttp://pyserial.sourceforge.net/
Serial portUSPPhttp://ibarona.googlepages.com/uspp
Parallel PortpyParallelhttp://pyserial.sourceforge.net/pyparallel.html
USB PortpyUSBhttp://bleyer.org/pyusb/
Windowsctypeshttp://starship.python.net/crew/theller/ctypes/
Windowspywin32http://sourceforge.net/projects/pywin32/
Windowspywinautohttp://www.openqa.org/pywinauto/
Windowspyrtfhttp://pyrtf.sourceforge.net/
Windowswmihttp://timgolden.me.uk/python/wmi.html
PDA/GSM/Mobilespymohttp://www.awaretek.com/pymo.html
PDA/GSM/MobilespyS60http://sourceforge.net/projects/pys60
SoundpySoundichttp://pysonic.sourceforge.net/
SoundpyMediahttp://pymedia.org/
SoundFMODhttp://www.fmod.org/
SoundpyMIDIhttp://www.cs.unc.edu/Research/assist/developer.shtml
GMaillibgmailhttp://libgmail.sourceforge.net/
GooglepyGooglehttp://pygoogle.sourceforge.net/
ExpectpyExpecthttp://pexpect.sourceforge.net/
WordNetpyWordNethttp://osteele.com/projects/pywordnet/
Command linecmdhttp://blog.doughellmann.com/2008/05/pymotw-cmd.html
Compiler backendllvm-pyhttp://mdevan.nfshost.com/llvm-py/
3DVPythonhttp://vpython.org
可以參考:https://wiki.python.org/moin/UsefulModules
Easy Install: easy_install 安裝工具,下面提到的多數lib都能用easy_install lib_name進行安裝
SQLAlchemy,SQLObject,Mysql-Python(Win32安裝包):數據庫訪問,發芽網后臺用到了Mysql-Python
CTypes– 直接調用dll中的函數,經常用來做Windows API的調用
WxPython– Python UI庫,Ulipad就是基于這個
Ascii_table:在命令行界面中輸出漂亮的表格
Python Imaging Library (PIL):圖片處理,發芽網的Captcha用到了這個
PyAudio:WAV文件讀寫,錄音,用這個寫過一個錄音工具,還不錯
HTTPLib2:非常好用的http工具,做cookie、put請求、header、錯誤處理等等很方便,可以做網絡爬蟲或者訪問webservice的腳本
Psyco:只要簡單的寫下如下兩句話,就能讓你的python腳本快很多,在需要很多計算的腳本里很好用,求解華容道時試過,速度改進的不錯,雖然最后還是沒有達到要求,改用C++寫了一個:
import psyco
psyco.full()
PyObjC: Python寫ObjectiveC/cocoa程序作為一個遺憾放在這兒吧,要是支持iOS就好了
PyWin32:針對win32常用的系統api做了很好的封裝,用這個寫過一個彩色命令行腳本
NumPy,SciPy,Matplotlib:科學計算的三神器,更多參見這里。有本在線的書:用Python做科學計算,旅居日本的hyry寫的,值得一看
Py2exe: 把你的python腳本轉成exe可執行程序,曾經用過,僅支持到python2.5所以最近沒用過了
Django:使用最多的Python web framework,發芽網也是基于Django
lxml:XML文件處理的利器。最近兩年有點兒煩HTML,改用json了
iPython: 更加好用的Python命令行交互環境
python-openid:Python下做OpenID,都得用這個,發芽網的OpenID支持也是基于這個做的
Pygements:代碼發芽網的高亮,用的就是這個庫,略該,以適應直接復制粘貼的需求
nose:python下的測試驅動工具,曾經用過,很簡潔。現在我用doctest更多一點
http://blog.jobbole.com/52355/
Python是優雅的,使用這些庫可以使你的代碼更簡潔,并保持持久性。歡迎各位補充,并提出意見!
Docopt。拋棄optparse和argparse吧,使用docstrings來構建優雅的,可讀性強的,并且復雜(如果你需要的話)的命令行界面。IMO2013年創建的最好的庫。
Requests,或稱為人類使用的HTTP,是一個處理HTTP請求更為pythonic 的方法,比urllib2更更更好用??诒梢?,他在PyPI上下載已經超過5,000,000次 :)。
lxml是libxml2和libxslt的合體。如果你要處理XML或HTML,lxml是最好的選擇。
Bottle是一個快速,簡單,輕量級的WSGI微型web框架。幾秒內就能構建小型站點和APIs。所有的框架只有一個py文件,你甚至可以放進任意目錄。
sh是一個成熟的Python子進程界面工具,允許你像運行函數一樣運行任何程序。超級好用。
Structlog是一個先進的日志記錄處理器。他集成了多個現存的日志記錄工具,包含了Python標準庫。你可以創建普通記錄器,按你所想增加內容,使你的日志擁有持久性和可讀性。
Watchdog是一個跨平臺的Python庫和shell工具,可以監視文件系統事件。超級好用,并且容易上手。
Delorean可以是你用非常方便的方法來處理數據和時間。設置時區,截取到秒,分,小時,或者甚至使用特殊方法從一個數據迭代到另一個。瀏覽下文檔,里面有很多示例。
附贈
PEW.我是一個月前發現這個項目,并已喜歡上了。PEW是一套管理多個虛擬環境的工具,在bash,zsh,fish和powershell上完美運行。去試試吧。
antigravity。運行一個Python shell(版本>=2.7),然后輸入import antigravity。
Python常用模塊大全:
http://www.pythontab.com/pytools/
Graphical interface Tkinter 3000
Web pythonweb
Localisation geoname.py
Parallel Port pyParallel
Windows ctypes
Windows pywin32
Windows wmi
Sound pyMedia
Google pyGoogle
Command line cmd
ctypes
python標準庫:
http://www.pythondoc.com/pythontutorial3/stdlib.html
pyzh庫:
http://pyzh.readthedocs.org/en/latest/awesome-python-libraries.html
Windows Python庫安裝包下載地址大全
http://pythontip.sinaapp.com/winpy_libs
python官方中文教程:
http://www.pythondoc.com/pythontutorial3/index.html
其他:http://www.oschina.net/question/12_78983