未知
项目描述
Muffin-ElasticSearch – 一个简单的适用于 muffin 框架的Elasticsearch插件。
要求
python >= 3.4
muffin >= 0.5.5
aioes == 0.4
安装
Muffin-ElasticSearch 应使用pip进行安装
pip install muffin-elasticsearch
使用
将 muffin-elasticsearch 添加到muffin插件列表
import muffin
app = muffin.Application(
'example',
PLUGINS=(
'muffin_elasticsearch',
)
)
并使用 Elasticsearch 插件
@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)
选项
ELASTICSEARCH_ENDPOINTS |
Elasticsearch服务器列表 (['localhost:9200']) |
错误跟踪器
如果您有任何建议、错误报告或烦恼,请向https://github.com/drgarcia1986/muffin-elasticsearch/issues 的问题跟踪器报告
贡献
Muffin-ElasticSearch的开发发生在:https://github.com/drgarcia1986/muffin-elasticsearch
贡献者
drgarcia1986 (Diego Garcia)
许可证
许可协议MIT许可证。
项目详情
关闭
muffin-elasticsearch-0.0.2.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | b77c300d2dcec8846923f75b8e6f7f654d9837735fdf34f03b8431995573d5a4 |
|
MD5 | 78f3443d4e4450acca44b1642b8103e1 |
|
BLAKE2b-256 | 88cca17a6e1a7b315c1260b9ca0d0f371a67e1b5df55415572ae3f186c66fb9d |