opener = urllib.request.build_opener(HTTPSClientAuthHandler('/path/to/file.pem',
    '/path/to/file.pem.'))
response = opener.open('https://example.org')
print(response.read())
Using paired certificates with urllib2