Skip to main content

Vigil Reporter for Python

Project description

py-vigil-reporter

codecov downloads

Vigil Reporter for Python. Used in pair with Vigil, the Microservices Status Page.

Who uses it?

Smartphoniker

How to install

Install with pip:

$ pip install py-vigil-reporter

How to use

vigil-reporter can be instantiated as such:

from vigil_reporter.reporter import VigilReporter

SAMPLE_CONFIG = {
    "url": "http://localhost:8080",
    "token": "REPLACE_THIS_WITH_A_SECRET_KEY",
    "probe_id": "stats",
    "node_id": "stats-node",
    "replica_id": "192.168.1.103",
    "interval": 5
}
reporter = VigilReporter.from_config(SAMPLE_CONFIG)
reporter.start_reporting()
print("You can continue with your normal work here!")

This module uses the threading.Timer class from the threading module to run reporting in background. This makes the method non-blocking.

NOTE: The threaded execution drifts about +/- 0.05 seconds. But this won't be an issue, as you should set an interval that is greater than 1.0 seconds.

For further details see this Stackoverflow post.

What is Vigil?

ℹ️ Wondering what Vigil is? Check out valeriansaliou/vigil.

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

py-vigil-reporter-0.2.0.tar.gz (5.8 kB view hashes)

Uploaded Source

Built Distribution

py_vigil_reporter-0.2.0-py3-none-any.whl (7.3 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