Examples of reusable modules
You don't have to look very far to find examples of reusable modules; the Python Package Index (https://pypi.python.org/pypi) provides a huge repository of shared modules and packages. You can search for a package by name or keyword, or you can browse through the repository by topic, license, intended audience, development status, and so on.
While the Python Package Index is huge, it is also extremely useful: all of the most successful packages and modules are included. Let's look more closely at some of these more popular reusable packages.
requests
The
requests
library (http://docs.python-requests.org/en/master/) is a Python package that makes it easy to send HTTP requests to remote servers and process the response. While the urllib2
package included in the Python Standard Library does allow you to make HTTP requests, it is often difficult to use and fails in unexpected ways. The requests
package is far easier to use and more reliable; as a result, it has become...