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()
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.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size aioelasticsearch-0.7.0-py3-none-any.whl (11.0 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size aioelasticsearch-0.7.0.tar.gz (10.0 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for aioelasticsearch-0.7.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80b5edb56252c3b3636358837783efd6db878aa7336e13117913080f9189df6c |
|
MD5 | d3489921a7266b2631a9f4a60917df85 |
|
BLAKE2-256 | adebcde79c947fb3dd70a21950da7bd55569bc17880accd8481bf6c7427a3581 |