Vigil Reporter for Python
Project description
py-vigil-reporter
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for py_vigil_reporter-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2199b9a16eb9d096732de74fafbe12a43e290b8e2990157a4f47448faeebc0f |
|
MD5 | 608b4dda26e4cb682ecefcd6ca9d8561 |
|
BLAKE2b-256 | 6a039ca3dd392fa7c4df380a2161244c8395520d050251b5c89fe1cad59ef890 |