UNKNOWN
Project description
Muffin-ElasticSearch – A simple ElasticSearch plugin for muffin framework.
Requirements
python >= 3.4
muffin >= 0.5.5
aioes == 0.4
Installation
Muffin-ElasticSearch should be installed using pip:
pip install muffin-elasticsearch
Usage
Add muffin-elasticsearch to muffin plugin list:
import muffin
app = muffin.Application(
'example',
PLUGINS=(
'muffin_elasticsearch',
)
)
And use ElasticSearch plugin:
@app.register('/search')
class Example(muffin.Handler):
@asyncio.coroutine
def post(self, request):
body = yield from request.json()
result = yield from app.ps.elasticsearch.create(
index='my-index',
doc_type='test',
id=42,
body=body
)
return muffin.json_response(
data=result, status=201
)
@asyncio.coroutine
def get(self, request):
ret = yield from app.ps.elasticsearch.get(
index='my-index',
doc_type='test-type',
id=42
)
return muffin.json_response(data=result)
Options
ELASTICSEARCH_ENDPOINTS |
List of ElasticSearch servers (['localhost:9200']) |
Bug tracker
If you have any suggestions, bug reports or annoyances please report them to the issue tracker at https://github.com/drgarcia1986/muffin-elasticsearch/issues
Contributing
Development of Muffin-ElasticSearch happens at: https://github.com/drgarcia1986/muffin-elasticsearch
Contributors
drgarcia1986 (Diego Garcia)
License
Licensed under a MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for muffin-elasticsearch-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b77c300d2dcec8846923f75b8e6f7f654d9837735fdf34f03b8431995573d5a4 |
|
MD5 | 78f3443d4e4450acca44b1642b8103e1 |
|
BLAKE2b-256 | 88cca17a6e1a7b315c1260b9ca0d0f371a67e1b5df55415572ae3f186c66fb9d |