Skip to main content

Matelabdev Watcher heartbeat client for Python applications

Project description

matelabdev-watcher-client

Python heartbeat client for Matelabdev Watcher.

Install

pip install matelabdev-watcher-client

Usage

from matelabdev_watcher import WatcherClient

watcher = WatcherClient(
    master_url="https://watcher.example.com",
    token="prj_xxxxxxxxxxxx",
    monitor_key="lens-app",
    interval=30,
)
watcher.start()   # daemon thread — stops automatically when process exits

Manual ping

watcher.ping()    # single one-off heartbeat
watcher.stop()    # stop the background thread

Environment variables (recommended)

import os
from matelabdev_watcher import WatcherClient

watcher = WatcherClient(
    master_url=os.environ["WATCHER_URL"],
    token=os.environ["WATCHER_TOKEN"],
    monitor_key=os.environ.get("WATCHER_MONITOR_KEY", "app"),
)
watcher.start()

Behavior

  • Heartbeats are fire-and-forget — failures are silently suppressed so your app is never affected.
  • The background thread is a daemon, so it exits automatically when the main process ends.
  • Calling start() multiple times is safe (idempotent).

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

matelabdev_watcher_client-1.0.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

matelabdev_watcher_client-1.0.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file matelabdev_watcher_client-1.0.0.tar.gz.

File metadata

File hashes

Hashes for matelabdev_watcher_client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 386ff86cf91eb6f92060888ac76b6860e2d6c2446956ede05a449643ba96460a
MD5 a8e6ec98441f90a3a325684abfb36ba5
BLAKE2b-256 81e9e468c7480767e0fb17670a52d883e3198242c1cbf82245fde705eaafafe5

See more details on using hashes here.

File details

Details for the file matelabdev_watcher_client-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for matelabdev_watcher_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4163916b25d7a92ccaaef7aa3c3827da870d210930eff9db6367451f34003fdf
MD5 eebea412e72e13d2912191faf130f024
BLAKE2b-256 54001dd50cb9573959d7abe2bb2eccb0d7ded3a3151f20de8dfdc72243b72091

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page