def __init__(self,
                 host='localhost',
                 port=8086,
                 username='root',
                 password='root',
                 database=None,
                 ssl=False,
                 verify_ssl=False,
                 timeout=None,
                 retries=3,
                 use_udp=False,
                 udp_port=4444):
        """Construct a new InfluxDBClient object."""
        self._host = host
        self._port = port
        self._username = username
        self._password = password
        self._database = database
        self._timeout = timeout
        self._retries = retries

        self._verify_ssl = verify_ssl

        self._use_udp = use_udp
        self._udp_port = udp_port
        if use_udp:
            self.udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

        self._scheme = "http"

        if ssl is True:
            self._scheme = "https"

        self._baseurl = "{0}://{1}:{2}".format(
            self._scheme,
            self._host,
            self._port)

        self._headers = {
            'Content-type': 'application/json',
            'Accept': 'text/plain'}
def __init__ ( self , host = 'localhost' , port = 8086 , username = 'root' , password = 'root' , database = None , ssl = False , verify_ssl = False , timeout = None , retries = 3 , use_udp = False , udp_port = 4444 ) : self . _host = host self . _port = port self . _username = username self . _password = password self . _database = database self . _timeout = timeout self . _retries = retries self . _verify_ssl = verify_ssl self . _use_udp = use_udp self . _udp_port = udp_port if use_udp : self . udp_socket = socket . socket ( socket . AF_INET , socket . SOCK_DGRAM ) self . _scheme = "http" if ssl is True : self . _scheme = "https" self . _baseurl = "{0}://{1}:{2}" . format ( self . _scheme , self . _host , self . _port ) self . _headers = { 'Content-type' : 'application/json' , 'Accept' : 'text/plain' }
Construct a new InfluxDBClient object.