esguard provides a Python decorator that waits for processing while monitoring the load of Elasticsearch.


License
Apache-2.0
Install
pip install esguard==0.1.9

Documentation

esguard-logo

esguard

esguard provides a Python decorator that waits for processing while monitoring the load of Elasticsearch.

PyPi version PyTest

Quick Start

You need to launch elasticsearch before quick start.

from esguard import ESGuard


@ESGuard(os_cpu_percent=95).decorator
def mock_func(x):
    return x

self.assertEqual(mock_func(1), 1)

Test

You need to launch elasticsearch before testing.

$ docker compose up -d --build
$ poetry run pytest