1
1
Python Elasticsearch Client
2
2
===========================
3
3
4
+ .. image:: https://img.shields.io/pypi/v/elasticsearch
5
+ :target: https://pypi.org/project/elasticsearch
6
+
7
+ .. image:: https://pepy.tech/badge/elasticsearch
8
+ :target: https://pepy.tech/project/elasticsearch?versions=*
9
+
10
+ .. image:: https://clients-ci.elastic.co/job/elastic+elasticsearch-py+master/badge/icon
11
+ :target: https://clients-ci.elastic.co/job/elastic+elasticsearch-py+master
12
+
13
+ .. image:: https://readthedocs.org/projects/elasticsearch-py/badge/?version=latest&style=flat
14
+ :target: https://elasticsearch-py.readthedocs.io
15
+
4
16
Official low-level client for Elasticsearch. Its goal is to provide common
5
17
ground for all Elasticsearch-related code in Python; because of this it tries
6
18
to be opinion-free and very extendable.
7
19
8
-
9
20
Installation
10
21
------------
11
22
@@ -62,7 +73,7 @@ versions are also released as ``elasticsearch2`` and ``elasticsearch5``.
62
73
Example use
63
74
-----------
64
75
65
- Simple use-case::
76
+ .. code-block:: python
66
77
67
78
>>> from datetime import datetime
68
79
>>> from elasticsearch import Elasticsearch
@@ -89,17 +100,17 @@ Simple use-case::
89
100
>>> es.get(index="my-index", id=42)['_source']
90
101
{'any': 'data', 'timestamp': '2019-05-17T17:28:10.329598'}
91
102
92
- `Full documentation`_.
103
+ Elastic Cloud (and SSL) use-case:
93
104
94
- .. _Full documentation: https://elasticsearch-py.readthedocs.io/
95
-
96
- Elastic Cloud (and SSL) use-case::
105
+ .. code-block:: python
97
106
98
107
>>> from elasticsearch import Elasticsearch
99
108
>>> es = Elasticsearch(cloud_id="<some_long_cloud_id>", http_auth=('elastic','yourpassword'))
100
109
>>> es.info()
101
110
102
- Using SSL Context with a self-signed cert use-case::
111
+ Using SSL Context with a self-signed cert use-case:
112
+
113
+ .. code-block:: python
103
114
104
115
>>> from elasticsearch import Elasticsearch
105
116
>>> from ssl import create_default_context
@@ -114,16 +125,16 @@ Features
114
125
115
126
The client's features include:
116
127
117
- * translating basic Python data types to and from json (datetimes are not
118
- decoded for performance reasons)
119
- * configurable automatic discovery of cluster nodes
120
- * persistent connections
121
- * load balancing (with pluggable selection strategy) across all available nodes
122
- * failed connection penalization (time based - failed connections won't be
123
- retried until a timeout is reached)
124
- * support for ssl and http authentication
125
- * thread safety
126
- * pluggable architecture
128
+ * translating basic Python data types to and from json (datetimes are not
129
+ decoded for performance reasons)
130
+ * configurable automatic discovery of cluster nodes
131
+ * persistent connections
132
+ * load balancing (with pluggable selection strategy) across all available nodes
133
+ * failed connection penalization (time based - failed connections won't be
134
+ retried until a timeout is reached)
135
+ * support for ssl and http authentication
136
+ * thread safety
137
+ * pluggable architecture
127
138
128
139
129
140
Elasticsearch-DSL
@@ -163,11 +174,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
163
174
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
164
175
See the License for the specific language governing permissions and
165
176
limitations under the License.
166
-
167
- Build Status
168
- ------------
169
- .. image:: https://readthedocs.org/projects/elasticsearch-py/badge/?version=latest&style=flat
170
- :target: https://elasticsearch-py.readthedocs.io/en/master/
171
-
172
- .. image:: https://clients-ci.elastic.co/job/elastic+elasticsearch-py+master/badge/icon
173
- :target: https://clients-ci.elastic.co/job/elastic+elasticsearch-py+master/
0 commit comments