Coder Social home page Coder Social logo

harpomarx / aioelasticsearch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aio-libs/aioelasticsearch

0.0 1.0 0.0 259 KB

aioelasticsearch-py wrapper for asyncio

Home Page: https://pypi.python.org/pypi/aioelasticsearch

License: MIT License

Python 100.00%

aioelasticsearch's Introduction

aioelasticsearch

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.

aioelasticsearch's People

Contributors

asvetlov avatar elysium31 avatar froosty avatar hellysmile avatar hzlmn avatar lightme16 avatar litwisha avatar paulefoe avatar pgtuk avatar pyup-bot avatar roganov avatar tpashkevych-exos avatar vangheem avatar webknjaz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.