Skip to main content

Unofficial low-level client for Elasticsearch. Its goal is to be a slight extension of the official elasticsearch-py library, while providing more frequent releases in the interim. Specifically, we are working with elasticsearch 2.x, 1.x is not supported, and 5.x is probably an afterthought. For support of either of those two, head to the main repo.

Compatibility

At the time of the fork, the most recent version of the elasticsearch 2.x version was 2.4.0, so the first release of

predikto-elasticsearch-py will be 2.4.1.

Installation

Install the elasticsearch package with pip:

pip install predikto-elasticsearch

Example use

Simple use-case:

>>> from datetime import datetime
>>> from elasticsearch import Elasticsearch

# by default we connect to localhost:9200
>>> es = Elasticsearch()

# create an index in elasticsearch, ignore status code 400 (index already exists)
>>> es.indices.create(index='my-index', ignore=400)
{u'acknowledged': True}

# datetimes will be serialized
>>> es.index(index="my-index", doc_type="test-type", id=42, body={"any": "data", "timestamp": datetime.now()})
{u'_id': u'42', u'_index': u'my-index', u'_type': u'test-type', u'_version': 1, u'ok': True}

# but not deserialized
>>> es.get(index="my-index", doc_type="test-type", id=42)['_source']
{u'any': u'data', u'timestamp': u'2013-05-12T19:45:31.804229'}

Features

The client’s features include:

  • translating basic Python data types to and from json (datetimes are not decoded for performance reasons)

  • configurable automatic discovery of cluster nodes

  • persistent connections

  • load balancing (with pluggable selection strategy) across all available nodes

  • failed connection penalization (time based - failed connections won’t be retried until a timeout is reached)

  • support for ssl and http authentication

  • thread safety

  • pluggable architecture

License

Copyright 2015 Elasticsearch

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Metadata

Release files for predikto-elasticsearch 2.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for predikto-elasticsearch 2.4.1
File Size Uploaded
predikto-elasticsearch-2.4.1.tar.gz 58.2 kB Details

Release files / predikto-elasticsearch-2.4.1.tar.gz

Download URL predikto-elasticsearch-2.4.1.tar.gz
Size 58.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ee5c4160166b424689bd70bfb80675db4c1befa6dd1c4350aeffd0851e134646
BLAKE2b-256 checksum
How to use checksums
b6798ca9603a3c6d5062cc9bb18d08b821d7d668b944deac8a9389d1cec246c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

2.4.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page