skip to navigation
skip to content

pyelasticsearch 0.1

Lightweight python wrapper for elasticsearch.

Latest Version: 1.4

A Python client for elasticsearch.


pyelasticsearch handles the low-level interactions with elasticsearch, allowing you to use native Python datatypes to index or perform queries.


conn = ElasticSearch('http://localhost:9200/')

# Index some documents.
conn.index({"name":"Joe Tester", "age": 25, "title": "QA Master"}, "contacts", "person", 1)
conn.index({"name":"Jessica Coder", "age": 32, "title": "Programmer"}, "contacts", "person", 2)
conn.index({"name":"Freddy Tester", "age": 29, "title": "Office Assistant"}, "contacts", "person", 3)

# Refresh the index to pick up the latest documents.

# Get just Jessica's document.
jessica = conn.get("contacts", "person", 2)

# Perform a simple search.
results ="name:joe OR name:freddy")

# Perform a search using the elasticsearch Query DSL (
query = {
    "query_string": {
        "query": "name:tester"
    "filtered": {
        "filter": {
            "range": {
                "age": {
                    "from": 27,
                    "to": 37,
results =

# Clean up.

For more examples, please check out the doctests &


Licensed under the New BSD license.


Used pysolr as a jumping off point - thanks guys.

File Type Py Version Uploaded on Size
pyelasticsearch-0.1.tar.gz (md5) Source 2012-08-30 7KB