Have you considered using http://docs.python-requests.org/en/latest/ ?