This file is indexed.

/usr/share/doc/python-elasticsearch-doc/html/connection.html is in python-elasticsearch-doc 1.6.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Connection Layer API &mdash; Elasticsearch 1.6.0 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     '1.6.0',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="Elasticsearch 1.6.0 documentation" href="index.html" />
    <link rel="next" title="Transport classes" href="transports.html" />
    <link rel="prev" title="Exceptions" href="exceptions.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="transports.html" title="Transport classes"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="exceptions.html" title="Exceptions"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">Elasticsearch 1.6.0 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="connection-layer-api">
<span id="connection-api"></span><h1>Connection Layer API<a class="headerlink" href="#connection-layer-api" title="Permalink to this headline"></a></h1>
<p>All of the classes reponsible for handling the connection to the Elasticsearch
cluster. The default subclasses used can be overriden by passing parameters to the
<a class="reference internal" href="api.html#elasticsearch.Elasticsearch" title="elasticsearch.Elasticsearch"><tt class="xref py py-class docutils literal"><span class="pre">Elasticsearch</span></tt></a> class. All of the arguments to the client
will be passed on to <a class="reference internal" href="#elasticsearch.Transport" title="elasticsearch.Transport"><tt class="xref py py-class docutils literal"><span class="pre">Transport</span></tt></a>,
<a class="reference internal" href="#elasticsearch.ConnectionPool" title="elasticsearch.ConnectionPool"><tt class="xref py py-class docutils literal"><span class="pre">ConnectionPool</span></tt></a> and <tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt>.</p>
<p>For example if you wanted to use your own implementation of the
<a class="reference internal" href="#elasticsearch.ConnectionSelector" title="elasticsearch.ConnectionSelector"><tt class="xref py py-class docutils literal"><span class="pre">ConnectionSelector</span></tt></a> class you can just pass in the
<tt class="docutils literal"><span class="pre">selector_class</span></tt> parameter.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last"><a class="reference internal" href="#elasticsearch.ConnectionPool" title="elasticsearch.ConnectionPool"><tt class="xref py py-class docutils literal"><span class="pre">ConnectionPool</span></tt></a> and related options (like
<tt class="docutils literal"><span class="pre">selector_class</span></tt>) will only be used if more than one connection is defined.
Either directly or via the <a class="reference internal" href="index.html#sniffing"><em>Sniffing</em></a> mechanism.</p>
</div>
<span class="target" id="module-elasticsearch"></span><div class="section" id="transport">
<h2>Transport<a class="headerlink" href="#transport" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="elasticsearch.Transport">
<em class="property">class </em><tt class="descclassname">elasticsearch.</tt><tt class="descname">Transport</tt><big>(</big><em>hosts</em>, <em>connection_class=Urllib3HttpConnection</em>, <em>connection_pool_class=ConnectionPool</em>, <em>nodes_to_host_callback=construct_hosts_list</em>, <em>sniff_on_start=False</em>, <em>sniffer_timeout=None</em>, <em>sniff_on_connection_fail=False</em>, <em>serializer=JSONSerializer()</em>, <em>max_retries=3</em>, <em>** kwargs</em><big>)</big><a class="headerlink" href="#elasticsearch.Transport" title="Permalink to this definition"></a></dt>
<dd><p>Encapsulation of transport-related to logic. Handles instantiation of the
individual connections as well as creating a connection pool to hold them.</p>
<p>Main interface is the <cite>perform_request</cite> method.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>hosts</strong> &#8211; list of dictionaries, each containing keyword arguments to
create a <cite>connection_class</cite> instance</li>
<li><strong>connection_class</strong> &#8211; subclass of <tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt> to use</li>
<li><strong>connection_pool_class</strong> &#8211; subclass of <a class="reference internal" href="#elasticsearch.ConnectionPool" title="elasticsearch.ConnectionPool"><tt class="xref py py-class docutils literal"><span class="pre">ConnectionPool</span></tt></a> to use</li>
<li><strong>host_info_callback</strong> &#8211; callback responsible for taking the node information from
<cite>/_cluser/nodes</cite>, along with already extracted information, and
producing a list of arguments (same as <cite>hosts</cite> parameter)</li>
<li><strong>sniff_on_start</strong> &#8211; flag indicating whether to obtain a list of nodes
from the cluser at startup time</li>
<li><strong>sniffer_timeout</strong> &#8211; number of seconds between automatic sniffs</li>
<li><strong>sniff_on_connection_fail</strong> &#8211; flag controlling if connection failure triggers a sniff</li>
<li><strong>sniff_timeout</strong> &#8211; timeout used for the sniff request - it should be a
fast api call and we are talking potentially to more nodes so we want
to fail quickly. Not used during initial sniffing (if
<tt class="docutils literal"><span class="pre">sniff_on_start</span></tt> is on) when the connection still isn&#8217;t
initialized.</li>
<li><strong>serializer</strong> &#8211; serializer instance</li>
<li><strong>serializers</strong> &#8211; optional dict of serializer instances that will be
used for deserializing data coming from the server. (key is the mimetype)</li>
<li><strong>default_mimetype</strong> &#8211; when no mimetype is specified by the server
response assume this mimetype, defaults to <cite>&#8216;application/json&#8217;</cite></li>
<li><strong>max_retries</strong> &#8211; maximum number of retries before an exception is propagated</li>
<li><strong>retry_on_status</strong> &#8211; set of HTTP status codes on which we should retry
on a different node. defaults to <tt class="docutils literal"><span class="pre">(503,</span> <span class="pre">504,</span> <span class="pre">)</span></tt></li>
<li><strong>retry_on_timeout</strong> &#8211; should timeout trigger a retry on different
node? (default <cite>False</cite>)</li>
<li><strong>send_get_body_as</strong> &#8211; for GET requests with body this option allows
you to specify an alternate way of execution for environments that
don&#8217;t support passing bodies with GET requests. If you set this to
&#8216;POST&#8217; a POST method will be used instead, if to &#8216;source&#8217; then the body
will be serialized and passed as a query parameter <cite>source</cite>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>Any extra keyword arguments will be passed to the <cite>connection_class</cite>
when creating and instance unless overriden by that connection&#8217;s
options provided as part of the hosts parameter.</p>
<dl class="method">
<dt id="elasticsearch.Transport.add_connection">
<tt class="descname">add_connection</tt><big>(</big><em>host</em><big>)</big><a class="headerlink" href="#elasticsearch.Transport.add_connection" title="Permalink to this definition"></a></dt>
<dd><p>Create a new <tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt> instance and add it to the pool.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>host</strong> &#8211; kwargs that will be used to create the instance</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="elasticsearch.Transport.get_connection">
<tt class="descname">get_connection</tt><big>(</big><big>)</big><a class="headerlink" href="#elasticsearch.Transport.get_connection" title="Permalink to this definition"></a></dt>
<dd><p>Retreive a <tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt> instance from the
<a class="reference internal" href="#elasticsearch.ConnectionPool" title="elasticsearch.ConnectionPool"><tt class="xref py py-class docutils literal"><span class="pre">ConnectionPool</span></tt></a> instance.</p>
</dd></dl>

<dl class="method">
<dt id="elasticsearch.Transport.mark_dead">
<tt class="descname">mark_dead</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#elasticsearch.Transport.mark_dead" title="Permalink to this definition"></a></dt>
<dd><p>Mark a connection as dead (failed) in the connection pool. If sniffing
on failure is enabled this will initiate the sniffing process.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>connection</strong> &#8211; instance of <tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt> that failed</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="elasticsearch.Transport.perform_request">
<tt class="descname">perform_request</tt><big>(</big><em>method</em>, <em>url</em>, <em>params=None</em>, <em>body=None</em><big>)</big><a class="headerlink" href="#elasticsearch.Transport.perform_request" title="Permalink to this definition"></a></dt>
<dd><p>Perform the actual request. Retrieve a connection from the connection
pool, pass all the information to it&#8217;s perform_request method and
return the data.</p>
<p>If an exception was raised, mark the connection as failed and retry (up
to <cite>max_retries</cite> times).</p>
<p>If the operation was succesful and the connection used was previously
marked as dead, mark it as live, resetting it&#8217;s failure count.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>method</strong> &#8211; HTTP method to use</li>
<li><strong>url</strong> &#8211; absolute url (without host) to target</li>
<li><strong>params</strong> &#8211; dictionary of query parameters, will be handed over to the
underlying <tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt> class for serialization</li>
<li><strong>body</strong> &#8211; body of the request, will be serializes using serializer and
passed to the connection</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="elasticsearch.Transport.set_connections">
<tt class="descname">set_connections</tt><big>(</big><em>hosts</em><big>)</big><a class="headerlink" href="#elasticsearch.Transport.set_connections" title="Permalink to this definition"></a></dt>
<dd><p>Instantiate all the connections and crate new connection pool to hold
them. Tries to identify unchanged hosts and re-use existing
<tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt> instances.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>hosts</strong> &#8211; same as <cite>__init__</cite></td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="elasticsearch.Transport.sniff_hosts">
<tt class="descname">sniff_hosts</tt><big>(</big><em>initial=False</em><big>)</big><a class="headerlink" href="#elasticsearch.Transport.sniff_hosts" title="Permalink to this definition"></a></dt>
<dd><p>Obtain a list of nodes from the cluster and create a new connection
pool using the information retrieved.</p>
<p>To extract the node connection parameters use the <tt class="docutils literal"><span class="pre">nodes_to_host_callback</span></tt>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>initial</strong> &#8211; flag indicating if this is during startup
(<tt class="docutils literal"><span class="pre">sniff_on_start</span></tt>), ignore the <tt class="docutils literal"><span class="pre">sniff_timeout</span></tt> if <tt class="docutils literal"><span class="pre">True</span></tt></td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="connection-pool">
<h2>Connection Pool<a class="headerlink" href="#connection-pool" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="elasticsearch.ConnectionPool">
<em class="property">class </em><tt class="descclassname">elasticsearch.</tt><tt class="descname">ConnectionPool</tt><big>(</big><em>connections</em>, <em>dead_timeout=60</em>, <em>selector_class=RoundRobinSelector</em>, <em>randomize_hosts=True</em>, <em>** kwargs</em><big>)</big><a class="headerlink" href="#elasticsearch.ConnectionPool" title="Permalink to this definition"></a></dt>
<dd><p>Container holding the <tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt> instances,
managing the selection process (via a
<a class="reference internal" href="#elasticsearch.ConnectionSelector" title="elasticsearch.ConnectionSelector"><tt class="xref py py-class docutils literal"><span class="pre">ConnectionSelector</span></tt></a>) and dead connections.</p>
<p>It&#8217;s only interactions are with the <a class="reference internal" href="#elasticsearch.Transport" title="elasticsearch.Transport"><tt class="xref py py-class docutils literal"><span class="pre">Transport</span></tt></a> class
that drives all the actions within <cite>ConnectionPool</cite>.</p>
<p>Initially connections are stored on the class as a list and, along with the
connection options, get passed to the <cite>ConnectionSelector</cite> instance for
future reference.</p>
<p>Upon each request the <cite>Transport</cite> will ask for a <cite>Connection</cite> via the
<cite>get_connection</cite> method. If the connection fails (it&#8217;s <cite>perform_request</cite>
raises a <cite>ConnectionError</cite>) it will be marked as dead (via <cite>mark_dead</cite>) and
put on a timeout (if it fails N times in a row the timeout is exponentially
longer - the formula is <cite>default_timeout * 2 ** (fail_count - 1)</cite>). When
the timeout is over the connection will be resurrected and returned to the
live pool. A connection that has been peviously marked as dead and
succeedes will be marked as live (it&#8217;s fail count will be deleted).</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>connections</strong> &#8211; list of tuples containing the
<tt class="xref py py-class docutils literal"><span class="pre">Connection</span></tt> instance and it&#8217;s options</li>
<li><strong>dead_timeout</strong> &#8211; number of seconds a connection should be retired for
after a failure, increases on consecutive failures</li>
<li><strong>timeout_cutoff</strong> &#8211; number of consecutive failures after which the
timeout doesn&#8217;t increase</li>
<li><strong>selector_class</strong> &#8211; <a class="reference internal" href="#elasticsearch.ConnectionSelector" title="elasticsearch.ConnectionSelector"><tt class="xref py py-class docutils literal"><span class="pre">ConnectionSelector</span></tt></a>
subclass to use if more than one connection is live</li>
<li><strong>randomize_hosts</strong> &#8211; shuffle the list of connections upon arrival to
avoid dog piling effect across processes</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="elasticsearch.ConnectionPool.get_connection">
<tt class="descname">get_connection</tt><big>(</big><big>)</big><a class="headerlink" href="#elasticsearch.ConnectionPool.get_connection" title="Permalink to this definition"></a></dt>
<dd><p>Return a connection from the pool using the <cite>ConnectionSelector</cite>
instance.</p>
<p>It tries to resurrect eligible connections, forces a resurrection when
no connections are availible and passes the list of live connections to
the selector instance to choose from.</p>
<p>Returns a connection instance and it&#8217;s current fail count.</p>
</dd></dl>

<dl class="method">
<dt id="elasticsearch.ConnectionPool.mark_dead">
<tt class="descname">mark_dead</tt><big>(</big><em>connection</em>, <em>now=None</em><big>)</big><a class="headerlink" href="#elasticsearch.ConnectionPool.mark_dead" title="Permalink to this definition"></a></dt>
<dd><p>Mark the connection as dead (failed). Remove it from the live pool and
put it on a timeout.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>connection</strong> &#8211; the failed instance</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="elasticsearch.ConnectionPool.mark_live">
<tt class="descname">mark_live</tt><big>(</big><em>connection</em><big>)</big><a class="headerlink" href="#elasticsearch.ConnectionPool.mark_live" title="Permalink to this definition"></a></dt>
<dd><p>Mark connection as healthy after a resurrection. Resets the fail
counter for the connection.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>connection</strong> &#8211; the connection to redeem</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="elasticsearch.ConnectionPool.resurrect">
<tt class="descname">resurrect</tt><big>(</big><em>force=False</em><big>)</big><a class="headerlink" href="#elasticsearch.ConnectionPool.resurrect" title="Permalink to this definition"></a></dt>
<dd><p>Attempt to resurrect a connection from the dead pool. It will try to
locate one (not all) eligible (it&#8217;s timeout is over) connection to
return to the live pool. Any resurrected connection is also returned.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>force</strong> &#8211; resurrect a connection even if there is none eligible (used
when we have no live connections). If force is specified resurrect
always returns a connection.</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="connection-selector">
<h2>Connection Selector<a class="headerlink" href="#connection-selector" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="elasticsearch.ConnectionSelector">
<em class="property">class </em><tt class="descclassname">elasticsearch.</tt><tt class="descname">ConnectionSelector</tt><big>(</big><em>opts</em><big>)</big><a class="headerlink" href="#elasticsearch.ConnectionSelector" title="Permalink to this definition"></a></dt>
<dd><p>Simple class used to select a connection from a list of currently live
connection instances. In init time it is passed a dictionary containing all
the connections&#8217; options which it can then use during the selection
process. When the <cite>select</cite> method is called it is given a list of
<em>currently</em> live connections to choose from.</p>
<p>The options dictionary is the one that has been passed to
<a class="reference internal" href="#elasticsearch.Transport" title="elasticsearch.Transport"><tt class="xref py py-class docutils literal"><span class="pre">Transport</span></tt></a> as <cite>hosts</cite> param and the same that is
used to construct the Connection object itself. When the Connection was
created from information retrieved from the cluster via the sniffing
process it will be the dictionary returned by the <cite>host_info_callback</cite>.</p>
<p>Example of where this would be useful is a zone-aware selector that would
only select connections from it&#8217;s own zones and only fall back to other
connections where there would be none in it&#8217;s zones.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>opts</strong> &#8211; dictionary of connection instances and their options</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="elasticsearch.ConnectionSelector.select">
<tt class="descname">select</tt><big>(</big><em>connections</em><big>)</big><a class="headerlink" href="#elasticsearch.ConnectionSelector.select" title="Permalink to this definition"></a></dt>
<dd><p>Select a connection from the given list.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>connections</strong> &#8211; list of live connections to choose from</td>
</tr>
</tbody>
</table>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="urllib3httpconnection-default-connection-class">
<h2>Urllib3HttpConnection (default connection_class)<a class="headerlink" href="#urllib3httpconnection-default-connection-class" title="Permalink to this headline"></a></h2>
<dl class="class">
<dt id="elasticsearch.Urllib3HttpConnection">
<em class="property">class </em><tt class="descclassname">elasticsearch.</tt><tt class="descname">Urllib3HttpConnection</tt><big>(</big><em>host='localhost'</em>, <em>port=9200</em>, <em>http_auth=None</em>, <em>use_ssl=False</em>, <em>verify_certs=False</em>, <em>ca_certs=None</em>, <em>client_cert=None</em>, <em>maxsize=10</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#elasticsearch.Urllib3HttpConnection" title="Permalink to this definition"></a></dt>
<dd><p>Default connection class using the <cite>urllib3</cite> library and the http protocol.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>http_auth</strong> &#8211; optional http auth information as either &#8216;:&#8217; separated
string or a tuple</li>
<li><strong>use_ssl</strong> &#8211; use ssl for the connection if <cite>True</cite></li>
<li><strong>verify_certs</strong> &#8211; whether to verify SSL certificates</li>
<li><strong>ca_certs</strong> &#8211; optional path to CA bundle. See
<a class="reference external" href="http://urllib3.readthedocs.org/en/latest/security.html#using-certifi-with-urllib3">http://urllib3.readthedocs.org/en/latest/security.html#using-certifi-with-urllib3</a>
for instructions how to get default set</li>
<li><strong>client_cert</strong> &#8211; path to the file containing the private key and the
certificate</li>
<li><strong>maxsize</strong> &#8211; the maximum number of connections which will be kept open to
this host.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Connection Layer API</a><ul>
<li><a class="reference internal" href="#transport">Transport</a></li>
<li><a class="reference internal" href="#connection-pool">Connection Pool</a></li>
<li><a class="reference internal" href="#connection-selector">Connection Selector</a></li>
<li><a class="reference internal" href="#urllib3httpconnection-default-connection-class">Urllib3HttpConnection (default connection_class)</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="exceptions.html"
                        title="previous chapter">Exceptions</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="transports.html"
                        title="next chapter">Transport classes</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/connection.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="transports.html" title="Transport classes"
             >next</a> |</li>
        <li class="right" >
          <a href="exceptions.html" title="Exceptions"
             >previous</a> |</li>
        <li><a href="index.html">Elasticsearch 1.6.0 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2013, Honza Král.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>