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
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file matelabdev_watcher_client-1.0.0.tar.gz.
File metadata
- Download URL: matelabdev_watcher_client-1.0.0.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
386ff86cf91eb6f92060888ac76b6860e2d6c2446956ede05a449643ba96460a
|
|
| MD5 |
a8e6ec98441f90a3a325684abfb36ba5
|
|
| BLAKE2b-256 |
81e9e468c7480767e0fb17670a52d883e3198242c1cbf82245fde705eaafafe5
|
File details
Details for the file matelabdev_watcher_client-1.0.0-py3-none-any.whl.
File metadata
- Download URL: matelabdev_watcher_client-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4163916b25d7a92ccaaef7aa3c3827da870d210930eff9db6367451f34003fdf
|
|
| MD5 |
eebea412e72e13d2912191faf130f024
|
|
| BLAKE2b-256 |
54001dd50cb9573959d7abe2bb2eccb0d7ded3a3151f20de8dfdc72243b72091
|