Skip to main content

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

Project description

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

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

esguard-0.1.9.tar.gz (2.6 kB view hashes)

Uploaded Source

Built Distribution

esguard-0.1.9-py3-none-any.whl (2.7 kB view hashes)

Uploaded Python 3

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