def __init__(self, url='<STR_LIT>', path='<STR_LIT>', timeout=<NUM_LIT:30>,<EOL>json_encoder=encode_date_optional_time,<EOL>connection_pool=None,<EOL>connection_pool_kwargs={},<EOL>**kwargs):
super(Elastic, self).__init__()<EOL>if not isinstance(url, list) and not isstr(url):<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if isstr(url):<EOL><INDENT>decoded_url = self._decode_url(url, '<STR_LIT>')<EOL>path = self._build_path(decoded_url.path, path)<EOL>url = decoded_url.netloc<EOL>if decoded_url.scheme:<EOL><INDENT>url = '<STR_LIT>'.format(decoded_url.scheme, url)<EOL><DEDENT><DEDENT>if connection_pool is None:<EOL><INDENT>urls = [url] if isstr(url) else url<EOL>for host_url in urls:<EOL><INDENT>if '<STR_LIT>' not in host_url:<EOL><INDENT>host_url = '<STR_LIT>' + host_url<EOL><DEDENT>if urlparse.urlsplit(host_url).path not in ['<STR_LIT>', '<STR_LIT:/>']:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT><DEDENT>connections = [(self._get_connection_from_url(host_url, timeout,<EOL>**kwargs), {}) for host_url in urls]<EOL>connection_pool = ConnectionPool(connections,<EOL>**connection_pool_kwargs)<EOL><DEDENT>self.path = path<EOL>self.timeout = timeout  <EOL>self.json_encoder = json_encoder<EOL>self.connection_pool = connection_pool<EOL>
Constructs an :class:`Elastic <Elastic>`, client object.
        Returns :class:`Elastic <Elastic>` object.

        :param url: (optional) URL for the host the client will conenct to.
            A list of URL's can be provided if you want to use a connection
            pool for your requests. Each new call will use a different host
            from the conenction pool. If you don't provide any arguments to
            this constructor then the default url will be used.
        :param path: (optional) elasticserach api path you want to make the
            call to.
        :param timeout: (optional) an integer specifying the number of seconds
            to wait before timing out a call
        :param json_encoder: (optional) customize the way you encode data sent
            over to elasticsearch
        :param connection_pool: (optional) if you have a connection pool object
            that you want to reuse you can pass it in here; in this case, the
            url value will be ignored
        :param connection_pool_kwargs: (optional) a dictionary of arguments to
            be passed to the connection pool in order to expose its options
            directly to the rawes constructor