elasticsearch-py wrapper for asyncio
Project description
- info:
elasticsearch-py wrapper for asyncio
Installation
pip install aioelasticsearch
Usage
import asyncio
from aioelasticsearch import Elasticsearch
async def go():
es = Elasticsearch()
print(await es.search())
await es.close()
loop = asyncio.get_event_loop()
loop.run_until_complete(go())
loop.close()
Features
Asynchronous scroll
import asyncio
from aioelasticsearch import Elasticsearch
from aioelasticsearch.helpers import Scan
async def go():
async with Elasticsearch() as es:
async with Scan(
es,
index='index',
doc_type='doc_type',
query={},
) as scan:
print(scan.total)
async for doc in scan:
print(doc['_source'])
loop = asyncio.get_event_loop()
loop.run_until_complete(go())
loop.close()
Thanks
The library was donated by Ocean S.A.
Thanks to the company for contribution.
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
aioelasticsearch-0.5.0.tar.gz
(9.2 kB
view hashes)
Built Distribution
Close
Hashes for aioelasticsearch-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24f5cee24837dab1029fb0ecad8661b83653eb67c33a4f4cde33b4eadfd2e250 |
|
MD5 | 4833cd9b1aee45bd4e3dbc043fc91b28 |
|
BLAKE2b-256 | 0d2985cd556942d3e549ca9222d5c881de15583ea317094453516e8907764773 |