In database team we are developing services, some of the internal, which use HTTP for communication protocol and are typically based on RESTful architecture. To implement client side bindings for these services in Python we need reasonable HTTP client library which satisfies small set of requirements (copied from
- support for arbitrary methods (GET, POST, PUT, DELETE)
- basic and digest authentication
- support for HTTPS (optional)
- multi-part POST
- POST data streaming
Standard Python modules for HTTP are lacking in few areas. Out of several existing external packages requests looks most complete and widely used. Python library documentation in fact proposes to use requests instead of standard modules for high-level interface.
We are proposing to add requests package as an external dependency to DM stack. Currently only qserv is going to depend on it but it's likely that over time there will be other users for that package. The requests package itself does not have other required dependencies and includes its own copy of urllib3 package but optionally (if HTTPS support is needed) may use pyasn1, ndg-httpsclient, and pyOpenSSL.