def getConnection(self, host, timeout=300):
    return httplib.HTTPSConnection(host, key_file=self.key, cert_file=self.cert
        )
opener = urllib.request.build_opener(HTTPSClientAuthHandler('/path/to/file.pem',
    '/path/to/file.pem.'))
response = opener.open('https://example.org')
Using paired certificates with urllib2