Out of many reasons that make python awesome is its wide range of libraries and modules.
So if you are here either you already know Python is awesome !!! or you will, by the end of this list.
Here is a list of some of the best Python modules categorized in various categories –
Note: This is not an exhaustive list. Please comment if you think I have missed something important.
Youtube-dl is available as a Python module as well as a command-line program to download videos from YouTube.com and a few more sites. It is released to the public domain, which means you can modify it, redistribute it or use it however you like.
Pillow is a more-friendly fork of PIL (Python Imaging Library), providing features like cutting/merging images, image enhancement, color transform, geometrical transform, etc.
MoviePy is a Python module for video editing, which can be used for basic operations (like cuts, concatenations, title insertions), video compositing, video processing, or to create advanced effects. It can read and write the most common video formats, including GIF.
VPython makes it easy to create navigable 3D displays and animations, even for those with limited programming experience. Because it is based on Python, it also has much to offer for experienced programmers and researchers.
#2 Web Scraping & Crawling
Scrapy is a fast high-level web crawling and web scraping framework used to crawl websites and extract structured data from their pages. It can be used for a wide range of purposes, from data mining to monitoring and automated testing.
Beautiful Soup provides a few simple methods and Pythonic idioms for navigating, searching, and modifying a parse tree: a toolkit for dissecting a document(HTML, XML, etc.) and extracting what you need.
#3 Networking and System Administration
Requests is one of the most downloaded Python packages of all time, pulling in over 7,000,000 downloads every month. It allows you to send organic, grass-fed HTTP/1.1 requests, without the need for manual labor. There’s no need to manually add query strings to your URLs or to form-encode your POST data.
Paramiko is a Python (2.6+, 3.3+) implementation of the SSHv2 protocol, providing both client and server functionality.
Pexpect makes Python a better tool for controlling other applications. It is a pure Python module for spawning child applications, controlling them, and responding to expected patterns in their output.
Fabric provides a basic suite of operations for executing local or remote shell commands (normally or via sudo) and uploading/downloading files, as well as auxiliary functionality such as prompting the running user for input or aborting execution.
#4 File Processing
The shutil module includes high-level file operations such as copying, setting permissions, etc. It can be used for individual files as well as collections of file
PDFMiner is a tool for extracting information from PDF documents. Unlike other PDF-related tools, it focuses entirely on getting and analyzing text data. PDFMiner allows obtaining the exact location of texts in a page, as well as other information such as fonts or lines. It includes a PDF converter that can transform PDF files into other text formats (such as HTML).
unp is a command line tool that can unpack archives easily. It mainly acts as a wrapper around other shell tools that you can find on various POSIX systems.
Pygments. It is a generic syntax highlighter suitable for use in code hosting, forums, wikis or other applications that need to prettify source code.
#5 Education & Research
SymPy is a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) while keeping the code as simple as possible in order to be comprehensible and easily extensible. SymPy is written entirely in Python.
E.g – Finding roots of x3 + 2x2 + 4x + 8 using sympy
>>> from sympy import * >>> solve(Eq(x**3 + 2*x**2 + 4*x + 8, 0), x) [-2*I, 2*I, -2]
NumPy is the fundamental package for scientific computing with Python. Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional container of generic data.
NetworkX is a Python language software package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.
So what is your favorite module? Tell us in comments.