diff --git a/influxdb/client.py b/influxdb/client.py index e38d4b78..b3d8da83 100644 --- a/influxdb/client.py +++ b/influxdb/client.py @@ -45,8 +45,8 @@ class InfluxDBClient(object): False :type ssl: bool :param verify_ssl: verify SSL certificates for HTTPS requests, defaults to - False - :type verify_ssl: bool + False. If a string it must specify the path of a CA bundle to use. + :type verify_ssl: bool or str :param timeout: number of seconds Requests will wait for your client to establish a connection, defaults to None :type timeout: int @@ -59,6 +59,9 @@ class InfluxDBClient(object): :type udp_port: int :param proxies: HTTP(S) proxy to use for Requests, defaults to {} :type proxies: dict + :param ssl_cert: if string, path to ssl client cert file (.pem). If tuple, + ('cert', 'key') pair. + :type ssl_cert: str or tuple of str """ def __init__(self, @@ -75,6 +78,7 @@ def __init__(self, udp_port=4444, proxies=None, pool_size=10, + ssl_cert=None ): """Construct a new InfluxDBClient object.""" self.__host = host @@ -86,6 +90,7 @@ def __init__(self, self._retries = retries self._verify_ssl = verify_ssl + self._ssl_cert = ssl_cert self.__use_udp = use_udp self.__udp_port = udp_port @@ -249,7 +254,8 @@ def request(self, url, method='GET', params=None, data=None, headers=headers, proxies=self._proxies, verify=self._verify_ssl, - timeout=self._timeout + timeout=self._timeout, + cert=self._ssl_cert ) break except (requests.exceptions.ConnectionError,
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: