HTTPS connection Python

I am trying to verify the that target exposes a https web service. I have code to connect via HTTP but I am not sure how to connect via HTTPS. I have read you use SSL but I have also read that it did not support certificate errors. The code I have got is from the python docs:

Opening a SSL socket connection in Python

I’m trying to establish a secure socket connection in Python, and i’m having a hard time with the SSL bit of it. I’ve found some code examples of how to establish a connection with SSL, but they all involve key files. The server i’m trying to connect with doesn’t need to receive any keys or certificates. My question is how do I essentially wrap a python socket connection with SSL. I know for a fact that the cipher i’m suppose to use is ADH-AES256-SHA, and the protocol is TLSv1. This is what i’ve been trying: