A simple python package to gather host information from Windows, Mac and Linux. Returns host data as dicts to be used internally or sent to front-end dashboard applications as JSON.
Project description
Host Inspector
A Python package to collect host/system information on macOS, Linux, and Windows.
Installation
uv add host-inspector
# or
python3 -m pip install host-inspector
Development Setup
just pip-install-editable
Testing and Checks
just ruff-check
just pytest
just api-check
List all available project commands:
just
Public API
Top-level imports from host_inspector:
from host_inspector import get_cpu_info
from host_inspector import get_datetime_info
from host_inspector import get_device_info
from host_inspector import get_disk_info
from host_inspector import get_display_info
from host_inspector import get_firewall_info
from host_inspector import get_gpu_info
from host_inspector import get_health_info
from host_inspector import get_mem_info
from host_inspector import get_network_info
from host_inspector import get_os_info
from host_inspector import get_platform_info
from host_inspector import get_uptime_info
Additional module APIs:
from host_inspector.firewall import get_firewall_info
from host_inspector.python import get_python_info
Example:
from host_inspector import get_device_info, get_health_info
from host_inspector.python import get_python_info
print(get_device_info())
print(get_health_info())
print(get_python_info())
Security Notes
Some firewall and hardware details may require elevated permissions depending on OS configuration.
Linux (optional sudoers setup)
If your deployment requires passwordless access for specific probes, use sudo visudo and add only what you need, for example:
%sudo ALL=(ALL) NOPASSWD: /usr/sbin/ufw
%sudo ALL=(ALL) NOPASSWD: /usr/sbin/dmidecode
Apply the minimum required permissions for your environment.
Issues
Report issues at: https://bitbucket.org/xstudios/host-inspector/issues
History
All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
0.3.0 (2026-04-20)
- CHANGED: Migrated packaging/build backend to
hatchlingwithxapp-tools. - CHANGED: Updated supported Python baseline to
>=3.11. - CHANGED: Removed legacy setuptools packaging artifacts and build helper scripts.
- CHANGED: Updated public API contract to focus on module-level exports.
- CHANGED: Memory reporting now aligns with OS expectations by deriving
usedfromtotal - availableand reporting physical RAM with binary sizing. - CHANGED: CPU usage reporting now uses sampled aggregate idle-time semantics for closer alignment with OS-reported utilization on macOS, Linux, and Windows.
0.2.5 (2026-03-13)
- CHANGED: Completed layered (domain/application/infrastructure) refactors across host info domains.
- CHANGED: Replaced dict-style application port payloads with dataclass DTO contracts where structured payloads cross boundaries.
- CHANGED: Updated README workflow docs to use
justcommands for setup/check/test tasks.
0.2.4 (2025-11-21)
- CHANGED: Firewall rule
enabledwill always be a boolean rather than YES/NO on Windows for consistency. - ADDED: Added tox and tox-uv for testing against multiple versions of python
0.2.3 (2025-10-07)
- CHANGED: Ensure tests pass on Ubuntu (not all data available - yet)
0.2.2 (2025-09-25)
- CHANGED: Standardize date/time formatting for device
uptimeandlocal_datetime
0.2.1 (2025-09-23)
- ADDED: Support for getting Linux Firewall status and rules using
ufw.
0.2.0 (2025-09-09)
- CHANGED:
get_device_infonow returns adisplayskey which is a list of connected displays - CHANGED:
get_gpu_infonow returns a list of dicts (one for each GPU) - ADDED:
get_display_inforeturns a list of dicts (one for each display) - CHANGED: For backawards compatability, when calling
get_device_info, thegpukey will be an object if only one GPU detected.
0.1.1 (2025-09-04)
- ADDED: Support for getting Windows Firewall status and rules
0.1.0 (2025-08-06)
- First release
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
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 host_inspector-0.3.0.tar.gz.
File metadata
- Download URL: host_inspector-0.3.0.tar.gz
- Upload date:
- Size: 103.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2518cdd509a650231e1fd5141537722a28a32e433ea7135e2c82b1e9617601f1
|
|
| MD5 |
f1d64aa3ce7303ab0c8b70d64c5b80a9
|
|
| BLAKE2b-256 |
73f7e640cfe4c67461f4d2069fa7d3080721bc0116491d238ce020211cffd09b
|
File details
Details for the file host_inspector-0.3.0-py3-none-any.whl.
File metadata
- Download URL: host_inspector-0.3.0-py3-none-any.whl
- Upload date:
- Size: 72.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fb8fbdee36b56a665094167b9a3bc7709069ca0c2946ac67f6d902aedaa0511
|
|
| MD5 |
09b370235a95a410b8574a6d259b4da7
|
|
| BLAKE2b-256 |
6ea231fa770dfbc17a78c58a63b69cb2084a33f0b3834dffb137fe7e6741b268
|