Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
16 changed files
with
1,057 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,27 @@ | |||
Copyright (c) Robert Eanes. | |||
All rights reserved. | |||
|
|||
Redistribution and use in source and binary forms, with or without modification, | |||
are permitted provided that the following conditions are met: | |||
|
|||
1. Redistributions of source code must retain the above copyright notice, | |||
this list of conditions and the following disclaimer. | |||
|
|||
2. Redistributions in binary form must reproduce the above copyright | |||
notice, this list of conditions and the following disclaimer in the | |||
documentation and/or other materials provided with the distribution. | |||
|
|||
3. Neither the name of pyelasticsearch nor the names of its contributors may be used | |||
to endorse or promote products derived from this software without | |||
specific prior written permission. | |||
|
|||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | |||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | |||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | |||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
include LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,86 @@ | |||
Metadata-Version: 1.1 | |||
Name: pyelasticsearch | |||
Version: 0.0.5 | |||
Summary: Lightweight python wrapper for elasticsearch. | |||
Home-page: http://github.com/rhec/pyelasticsearch | |||
Author: Robert Eanes | |||
Author-email: python@robsinbox.com | |||
License: UNKNOWN | |||
Description: =============== | |||
pyelasticsearch | |||
=============== | |||
|
|||
A Python client for `elasticsearch`_. | |||
|
|||
.. _`elasticsearch`: http://www.elasticsearch.org/ | |||
|
|||
|
|||
Usage | |||
===== | |||
|
|||
``pyelasticsearch`` handles the low-level interactions with elasticsearch, | |||
allowing you to use native Python datatypes to index or perform queries. | |||
|
|||
Example:: | |||
|
|||
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. | |||
conn.refresh(["contacts"]) | |||
|
|||
# Get just Jessica's document. | |||
jessica = conn.get("contacts", "person", 2) | |||
|
|||
# Perform a simple search. | |||
results = conn.search("name:joe OR name:freddy") | |||
|
|||
# Perform a search using the elasticsearch Query DSL (http://www.elasticsearch.org/guide/reference/query-dsl) | |||
query = { | |||
"query_string": { | |||
"query": "name:tester" | |||
}, | |||
"filtered": { | |||
"filter": { | |||
"range": { | |||
"age": { | |||
"from": 27, | |||
"to": 37, | |||
}, | |||
}, | |||
}, | |||
}, | |||
} | |||
results = conn.search(query) | |||
|
|||
# Clean up. | |||
conn.delete_index("contacts") | |||
|
|||
For more examples, please check out the doctests & ``tests.py``. | |||
|
|||
|
|||
License | |||
======= | |||
|
|||
Licensed under the New BSD license. | |||
|
|||
|
|||
Credits | |||
======= | |||
|
|||
Used `pysolr`_ as a jumping off point - thanks guys. | |||
|
|||
.. _`pysolr`: http://github.com/jkocherhans/pysolr | |||
|
|||
Platform: UNKNOWN | |||
Classifier: Development Status :: 2 - Pre-Alpha | |||
Classifier: Intended Audience :: Developers | |||
Classifier: License :: OSI Approved :: BSD License | |||
Classifier: Operating System :: OS Independent | |||
Classifier: Programming Language :: Python | |||
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search | |||
Requires: requests(>=0.9.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,86 @@ | |||
Metadata-Version: 1.1 | |||
Name: pyelasticsearch | |||
Version: 0.0.5 | |||
Summary: Lightweight python wrapper for elasticsearch. | |||
Home-page: http://github.com/rhec/pyelasticsearch | |||
Author: Robert Eanes | |||
Author-email: python@robsinbox.com | |||
License: UNKNOWN | |||
Description: =============== | |||
pyelasticsearch | |||
=============== | |||
|
|||
A Python client for `elasticsearch`_. | |||
|
|||
.. _`elasticsearch`: http://www.elasticsearch.org/ | |||
|
|||
|
|||
Usage | |||
===== | |||
|
|||
``pyelasticsearch`` handles the low-level interactions with elasticsearch, | |||
allowing you to use native Python datatypes to index or perform queries. | |||
|
|||
Example:: | |||
|
|||
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. | |||
conn.refresh(["contacts"]) | |||
|
|||
# Get just Jessica's document. | |||
jessica = conn.get("contacts", "person", 2) | |||
|
|||
# Perform a simple search. | |||
results = conn.search("name:joe OR name:freddy") | |||
|
|||
# Perform a search using the elasticsearch Query DSL (http://www.elasticsearch.org/guide/reference/query-dsl) | |||
query = { | |||
"query_string": { | |||
"query": "name:tester" | |||
}, | |||
"filtered": { | |||
"filter": { | |||
"range": { | |||
"age": { | |||
"from": 27, | |||
"to": 37, | |||
}, | |||
}, | |||
}, | |||
}, | |||
} | |||
results = conn.search(query) | |||
|
|||
# Clean up. | |||
conn.delete_index("contacts") | |||
|
|||
For more examples, please check out the doctests & ``tests.py``. | |||
|
|||
|
|||
License | |||
======= | |||
|
|||
Licensed under the New BSD license. | |||
|
|||
|
|||
Credits | |||
======= | |||
|
|||
Used `pysolr`_ as a jumping off point - thanks guys. | |||
|
|||
.. _`pysolr`: http://github.com/jkocherhans/pysolr | |||
|
|||
Platform: UNKNOWN | |||
Classifier: Development Status :: 2 - Pre-Alpha | |||
Classifier: Intended Audience :: Developers | |||
Classifier: License :: OSI Approved :: BSD License | |||
Classifier: Operating System :: OS Independent | |||
Classifier: Programming Language :: Python | |||
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search | |||
Requires: requests(>=0.9.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,9 @@ | |||
LICENSE | |||
MANIFEST.in | |||
pyelasticsearch.py | |||
setup.py | |||
pyelasticsearch.egg-info/PKG-INFO | |||
pyelasticsearch.egg-info/SOURCES.txt | |||
pyelasticsearch.egg-info/dependency_links.txt | |||
pyelasticsearch.egg-info/requires.txt | |||
pyelasticsearch.egg-info/top_level.txt |
1 change: 1 addition & 0 deletions
1
build/pyelasticsearch/pyelasticsearch.egg-info/dependency_links.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
requests>=0.9.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1 @@ | |||
pyelasticsearch |
Oops, something went wrong.