Skip to main content

hb-client

A secure, high-reliability heartbeat client for monitoring your systems using hbserver and hbwatcher.

Project Scope

This repository contains only the Python client library and CLI for sending heartbeat packets and managing local enrollment keys.

Related repositories:

  • hbserver (hb_backend): API/authentication and key lifecycle services
  • hbwatcher (hb_watcher): monitoring process that evaluates heartbeat data

Installation

pip install hb-client

See MIGRATION.md if upgrading from older distribution or config paths.

This installs:

  • the Python package hb_client
  • the CLI command hbclient

Quick Start

As a library

from hb_client import HbClient, HbConfig

config = HbConfig(server="hb.example.com", serverport=8333)
client = HbClient(name="my-service", interval=60, config=config)
client.send(task="deployment-complete")
client.close()

From the CLI

hbclient --server-url https://hb.example.com:8333 login
hbclient --server-url https://hb.example.com:8333 status
hbclient send --app my-service --task deploy --interval 60

Features

  • AES-GCM encrypted UDP transport with CRC32 integrity
  • OAuth Device Flow for key management
  • Secure by default with strict_security=True
  • Transparent DNS resolution with configurable refresh intervals
  • Deterministic key rotation with jitter to prevent thundering herd
  • Atomic file I/O for crash-safe credential storage
  • Human-readable duration parsing (e.g., 6h, 2.5d, 3w)

Configuration

Enrollment keys are stored under:

  • Linux: $XDG_CONFIG_HOME/hbclient/ or ~/.config/hbclient/
  • macOS: ~/Library/Application Support/hbclient/
  • Windows: %APPDATA%/hbclient/

Security Mode (strict_security)

HbClient accepts strict_security (default: True). If enrollment is missing, construction raises RuntimeError with guidance to run:

hbclient --server-url https://hb.example.com:8333 login

CLI Reference

hbclient [--server SERVER] [--serverport PORT] [--server-url URL] COMMAND

Development

pip install -e ".[dev]"
make test
make pre-release

Releasing

pip install -e ".[release]"
cz bump
make pre-release
python -m twine upload dist/hb_client-<version>*

License

Apache-2.0 — see LICENSE

Release files for hb-client 0.5.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hb-client 0.5.6
File Size Uploaded
hb_client-0.5.6.tar.gz 22.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hb-client 0.5.6
File Interpreter ABI Platform
hb_client-0.5.6-py3-none-any.whl Python 3 none any Details

Total release size: 39.2 kB

Release files / hb_client-0.5.6.tar.gz

Download URL hb_client-0.5.6.tar.gz
Size 22.2 kB
Tags Source
SHA-256 checksum
How to use checksums
17f2be08578989eef6498f4f2eef8f438db71ba25ee1abf0e645f45acefef9f1
BLAKE2b-256 checksum
How to use checksums
e9996279643049dd206cb968944d0e936a932e650c847830bea48c5715119ecf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.

Transparency log

Release files / hb_client-0.5.6-py3-none-any.whl

Download URL hb_client-0.5.6-py3-none-any.whl
Size 17.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5806d59f5033011b398c92e356ecd034252fa249f16485f343f1fb6a5bfc663b
BLAKE2b-256 checksum
How to use checksums
ce4d7ecffb21c8d1144b1fdcbb53e88e69b66dfba0a52cfe5f3773e1935d1f80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.6 This release

2 release files

0.5.5

2 release files

0.5.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page