SKALE Watchdog Client - SKALE and FAIR Nodes Health Checks
Project description
SKALE Watchdog Client
Minimal Python client for interacting with SKALE Watchdog node APIs (SKALE + FAIR).
Install
pip install skale-watchdog-client
Supports Python 3.13+.
Quick Start
from watchdog_client import SkaleNode, SkalePassiveNode, FairNode, FairPassiveNode
# Base URL can be domain name or IP address of the node.
skale_node = SkaleNode('my-skale-node.example.com')
# Use SkalePassiveNode for SKALE nodes running in passive mode
skale_passive = SkalePassiveNode('my-passive-skale-node.example.com')
fair_node = FairNode('my-fair-node.example.com')
# Use FairPassiveNode for FAIR nodes running in passive mode (no SGX endpoint)
fair_passive = FairPassiveNode('my-passive-fair-node.example.com')
# Call any endpoint – each returns ApiResult (fields: data, error, status_code)
r = skale_node.public_ip()
if r:
print('Public IP:', r.data)
else:
print('Error:', r.error)
# Execute every available check on a node
results = skale_node.all_checks()
for name, res in results.items():
print(name, 'OK' if res else f'ERR: {res.error}')
API
Common (available on both SkaleNode and FairNode)
- containers
- sgx (not available on FAIR passive nodes; see FairPassiveNode)
- hardware
- endpoint
- meta_info (maps to /meta-info)
- btrfs
- ssl
- check_report (maps to /check-report)
SKALE-specific (SkaleNode)
- schains
- ima
- schain_containers_versions (maps to /schain-containers-versions)
- public_ip (maps to /public-ip)
- validator_nodes (maps to /validator-nodes)
SKALE Passive (SkalePassiveNode)
Same as SkaleNode, except the following checks return an error (404), because they are not available on SKALE passive nodes:
- sgx
- schains
- ima
- validator_nodes
FAIR-specific (FairNode)
- chain_checks (maps to /chain-checks)
- chain_record (maps to /chain-record)
FAIR Passive (FairPassiveNode)
Same as FairNode, except:
- sgx — returns an error ApiResult: "SGX check is not available on FAIR passive nodes"
Batch execution
Call all_checks() on any node instance to execute each public check method (no params) and get a dict mapping method name to its ApiResult. One failing check does not stop others.
Result Object
res = fair.chain_checks()
if res:
print(res.data)
else:
raise RuntimeError(res.error)
License
All contributions are made under the GNU Affero General Public License v3. See LICENSE.
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 skale_watchdog_client-3.2.0.tar.gz.
File metadata
- Download URL: skale_watchdog_client-3.2.0.tar.gz
- Upload date:
- Size: 30.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c285363847562a9f778e84583a75709443dab58ae8fe92d2f6b5fe2f3c64081a
|
|
| MD5 |
b9d3077e10c4c1b3aac4ad9b20918a8e
|
|
| BLAKE2b-256 |
d60a91b04c7a238dfabd48e7216f73de47daa9d3b324cc51d4f91d51c67aaf97
|
File details
Details for the file skale_watchdog_client-3.2.0-py3-none-any.whl.
File metadata
- Download URL: skale_watchdog_client-3.2.0-py3-none-any.whl
- Upload date:
- Size: 28.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fa5271e3fe3da7871df3970a49e99fb77aa942d89f22d629977071d55ba20ca
|
|
| MD5 |
faf240b4fcecea3e9dcde794b0033695
|
|
| BLAKE2b-256 |
389add4f79d035f912a702b1f18be27ff4fe3c678f886a25ff41f96716b5c728
|