Skip to main content

elasticsearch-py wrapper for asyncio

Project description

info:

elasticsearch-py wrapper for asyncio

https://img.shields.io/travis/aio-libs/aioelasticsearch.svg https://img.shields.io/pypi/v/aioelasticsearch.svg https://codecov.io/gh/aio-libs/aioelasticsearch/branch/master/graph/badge.svg

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


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.7.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

aioelasticsearch-0.7.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file aioelasticsearch-0.7.0.tar.gz.

File metadata

  • Download URL: aioelasticsearch-0.7.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.1

File hashes

Hashes for aioelasticsearch-0.7.0.tar.gz
Algorithm Hash digest
SHA256 68763ddd7659fd3ea19115daeb01c7d6aca279062dacc51ad96ee37f9708fccc
MD5 a02c88ca8b0468ffaef9307c55583fe3
BLAKE2b-256 e75e11e5e286b869d2cd57eda13601ea5a9fc0370642d2c49323bd432d494390

See more details on using hashes here.

File details

Details for the file aioelasticsearch-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: aioelasticsearch-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.1

File hashes

Hashes for aioelasticsearch-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80b5edb56252c3b3636358837783efd6db878aa7336e13117913080f9189df6c
MD5 d3489921a7266b2631a9f4a60917df85
BLAKE2b-256 adebcde79c947fb3dd70a21950da7bd55569bc17880accd8481bf6c7427a3581

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page