https://github.com/aio-libs/aioelasticsearch
aioelasticsearch-py wrapper for asyncio
https://github.com/aio-libs/aioelasticsearch
aiohttp asyncio elasticsearch
Last synced: 28 days ago
JSON representation
aioelasticsearch-py wrapper for asyncio
- Host: GitHub
- URL: https://github.com/aio-libs/aioelasticsearch
- Owner: aio-libs
- License: mit
- Created: 2017-03-08T18:46:07.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-10T23:08:06.000Z (about 2 years ago)
- Last Synced: 2024-05-09T21:55:01.579Z (12 months ago)
- Topics: aiohttp, asyncio, elasticsearch
- Language: Python
- Homepage: https://pypi.python.org/pypi/aioelasticsearch
- Size: 254 KB
- Stars: 139
- Watchers: 20
- Forks: 41
- Open Issues: 29
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
README
aioelasticsearch
================:info: elasticsearch-py wrapper for asyncio
.. image:: https://img.shields.io/travis/aio-libs/aioelasticsearch.svg
:target: https://travis-ci.org/aio-libs/aioelasticsearch.. image:: https://img.shields.io/pypi/v/aioelasticsearch.svg
:target: https://pypi.python.org/pypi/aioelasticsearch.. image:: https://codecov.io/gh/aio-libs/aioelasticsearch/branch/master/graph/badge.svg
:target: https://codecov.io/gh/aio-libs/aioelasticsearchInstallation
------------.. code-block:: shell
pip install aioelasticsearch
Usage
-----.. code-block:: python
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 `_
.. code-block:: python
import asyncio
from aioelasticsearch import Elasticsearch
from aioelasticsearch.helpers import Scanasync 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.