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 details)

Uploaded Source

Built Distribution

py_vigil_reporter-0.2.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file py-vigil-reporter-0.2.0.tar.gz.

File metadata

  • Download URL: py-vigil-reporter-0.2.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.0

File hashes

Hashes for py-vigil-reporter-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1377d08f7a64ccd10b31c654af3f529eefbcd4068fcac02d35ac0ea24c81ca26
MD5 77077b77d2a4dc0166b7a3ef276baefe
BLAKE2b-256 5719451e6f7d4edb6f7fa939b7b502a9827273b4435b10678f3c5cf7a4412013

See more details on using hashes here.

File details

Details for the file py_vigil_reporter-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: py_vigil_reporter-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.0

File hashes

Hashes for py_vigil_reporter-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce46e38e8c022ccb845a6e953242d15b9c5e7c0ac5e6f87ff9080c885f75c2da
MD5 ad8f551f4115c0c94e87dc983e3b926c
BLAKE2b-256 b31d3214cb5522e83943a3ce7a2285aec7f3e9a41bb1209c62d1930ef94f039b

See more details on using hashes here.

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