def __init__(self, configuration=None, header_name=None, header_value=None, cookie=None, pool_threads=None): if configuration is None: configuration = Configuration() self.configuration = configuration self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. self.user_agent = 'OpenAPI-Generator/1.2.0dev/python'
def __init__(self, configuration=None, header_name=None, header_value=None, cookie=None, pool_threads=None, retries=False): """Initialize generic API client.""" if configuration is None: configuration = Configuration() self.configuration = configuration self.pool_threads = pool_threads self.rest_client = rest.RESTClientObject(configuration, retries=retries) self.default_headers = {} if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. self.user_agent = 'influxdb-client-python/1.16.0dev'
def __init__(self, configuration=None, header_name=None, header_value=None, cookie=None, pool_threads=None, **kwargs): """Initialize generic API client.""" if configuration is None: configuration = Configuration() self.configuration = configuration self.pool_threads = pool_threads self.rest_client = rest.RESTClientObjectAsync(configuration, **kwargs) self.default_headers = {} if header_name is not None: self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. from influxdb_client import VERSION self.user_agent = f'influxdb-client-python/{VERSION}'