File: transports.rst

package info (click to toggle)
python-elasticsearch 1.4.0-2~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 636 kB
  • sloc: python: 3,209; makefile: 155
file content (49 lines) | stat: -rw-r--r-- 1,140 bytes parent folder | download | duplicates (3)
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
.. _transports:

Transport classes
=================

List of transport classes that can be used, simply import your choice and pass
it to the constructor of :class:`~elasticsearch.Elasticsearch` as
`connection_class`. Note that Thrift and Memcached protocols are experimental
and require a plugin to be installed in your cluster as well as additional
dependencies (`thrift==0.9` and `pylibmc==1.2`).

For example to use the thrift connection just import it and use it. The
connection classes are aware of their respective default ports (9500 for
thrift) so there is no need to specify them unless modified::

    from elasticsearch import Elasticsearch, ThriftConnection
    es = Elasticsearch(connection_class=ThriftConnection)


.. py:module:: elasticsearch.connection

Connection
----------

.. autoclass:: Connection

Urllib3HttpConnection
---------------------

.. autoclass:: Urllib3HttpConnection


RequestsHttpConnection
----------------------

.. autoclass:: RequestsHttpConnection


ThriftConnection
----------------

.. autoclass:: ThriftConnection


MemcachedConnection
-------------------

.. autoclass:: MemcachedConnection