Looking into python-requests code:
# Look for requests environment configuration and be compatible
# with cURL.
if verify is True or verify is None:
verify = (os.environ.get('REQUESTS_CA_BUNDLE') or
os.environ.get('CURL_CA_BUNDLE'))
so you'll have to set up either of those environment variables to make an SSL call.
set environment variable REQUESTS_CA_BUNDLE:
$ export REQUESTS_CA_BUNDLE=/etc/ssl/certs/foo.crt
or set it to a directory
$ export REQUESTS_CA_BUNDLE=/etc/ssl/certs
http://docs.python-requests.org/en/master/user/advanced/#ssl-cert-verification
Note:
If verify is set to a path to a directory, the directory must have been
processed using the c_rehash utility supplied with OpenSSL.
so you have to rehash those certs in the directory:
$ cd /etc/ssl/certs
$ for i in *.crt; do ln -s $i $(openssl x509 -hash -noout -in $i).0; done
or
$ c_rehash /etc/ssl/certs