#NEWLINE# def __init__( self , hosts , connection_class = Urllib3HttpConnection , connection_pool_class = ConnectionPool , host_info_callback = get_host_info , sniff_on_start = False , sniffer_timeout = None , sniff_timeout = 0.1 , sniff_on_connection_fail = False , serializer = JSONSerializer ( ) , serializers = None , default_mimetype = 'application/json' , max_retries = 3 , retry_on_status = ( 503 , 504 ) , retry_on_timeout = False , send_get_body_as = 'GET' , **kwargs ) : #NEWLINE# #INDENT# "\n        :arg hosts: list of dictionaries, each containing keyword arguments to\n            create a `connection_class` instance\n        :arg connection_class: subclass of :class:`~elasticsearch.Connection` to use\n        :arg connection_pool_class: subclass of :class:`~elasticsearch.ConnectionPool` to use\n        :arg host_info_callback: callback responsible for taking the node information from\n            `/_cluser/nodes`, along with already extracted information, and\n            producing a list of arguments (same as `hosts` parameter)\n        :arg sniff_on_start: flag indicating whether to obtain a list of nodes\n            from the cluser at startup time\n        :arg sniffer_timeout: number of seconds between automatic sniffs\n        :arg sniff_on_connection_fail: flag controlling if connection failure triggers a sniff\n        :arg sniff_timeout: timeout used for the sniff request - it should be a\n            fast api call and we are talking potentially to more nodes so we want\n            to fail quickly. Not used during initial sniffing (if\n            ``sniff_on_start`` is on) when the connection still isn't\n            initialized.\n        :arg serializer: serializer instance\n        :arg serializers: optional dict of serializer instances that will be\n            used for deserializing data coming from the server. (key is the mimetype)\n        :arg default_mimetype: when no mimetype is specified by the server\n            response assume this mimetype, defaults to `'application/json'`\n        :arg max_retries: maximum number of retries before an exception is propagated\n        :arg retry_on_status: set of HTTP status codes on which we should retry\n            on a different node. defaults to ``(503, 504, )``\n        :arg retry_on_timeout: should timeout trigger a retry on different\n            node? (default `False`)\n        :arg send_get_body_as: for GET requests with body this option allows\n            you to specify an alternate way of execution for environments that\n            don't support passing bodies with GET requests. If you set this to\n            'POST' a POST method will be used instead, if to 'source' then the body\n            will be serialized and passed as a query parameter `source`.\n\n        Any extra keyword arguments will be passed to the `connection_class`\n        when creating and instance unless overriden by that connection's\n        options provided as part of the hosts parameter.\n        " #NEWLINE# _serializers = DEFAULT_SERIALIZERS . copy ( ) #NEWLINE# _serializers [ serializer . mimetype ] = serializer #NEWLINE# if serializers : #NEWLINE# #INDENT# _serializers . update ( serializers ) #NEWLINE# #UNINDENT# self . deserializer = Deserializer ( _serializers , default_mimetype ) #NEWLINE# self . max_retries = max_retries #NEWLINE# self . retry_on_timeout = retry_on_timeout #NEWLINE# self . retry_on_status = retry_on_status #NEWLINE# self . send_get_body_as = send_get_body_as #NEWLINE# self . serializer = serializer #NEWLINE# self . connection_pool_class = connection_pool_class #NEWLINE# self . connection_class = connection_class #NEWLINE# self . kwargs = kwargs #NEWLINE# self . hosts = hosts #NEWLINE# self . set_connections ( sniff_on_connection_fail ) #NEWLINE# self . seed_connections = self . connection_pool . connections [ : ] #NEWLINE# self . sniffer_timeout = sniffer_timeout #NEWLINE# self . sniff_on_connection_fail = sniff_on_connection_fail #NEWLINE# self . last_sniff = time . time ( ) #NEWLINE# self . sniff_timeout = sniff_timeout #NEWLINE# self . host_info_callback = host_info_callback #NEWLINE# if sniff_on_start : #NEWLINE# #INDENT# self . sniff_hosts ( True )