Skip to main content

Host Inspector

Coverage

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.

Known Issues

  • tzlocal is pinned to 5.4 and 5.4.1 and 5.4.2 broke the package.

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.2 (2026-06-16)

  • CHANGED: tzlocal is pinned to 5.4 and 5.4.1 and 5.4.2 broke the package.

0.3.1 (2026-06-12)

  • ADDED: Added IANA timezone value to get_datetime_info

0.3.0 (2026-04-20)

  • CHANGED: Migrated packaging/build backend to hatchling with xapp-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 used from total - available and 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 just commands for setup/check/test tasks.

0.2.4 (2025-11-21)

  • CHANGED: Firewall rule enabled will 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 uptime and local_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_info now returns a displays key which is a list of connected displays
  • CHANGED: get_gpu_info now returns a list of dicts (one for each GPU)
  • ADDED: get_display_info returns a list of dicts (one for each display)
  • CHANGED: For backawards compatability, when calling get_device_info, the gpu key 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

Metadata

Release files for host-inspector 0.3.2

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

Source distribution (sdist)

Source distribution for host-inspector 0.3.2
File Size Uploaded
host_inspector-0.3.2.tar.gz 103.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for host-inspector 0.3.2
File Interpreter ABI Platform
host_inspector-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 176.7 kB

Release files / host_inspector-0.3.2.tar.gz

Download URL host_inspector-0.3.2.tar.gz
Size 103.8 kB
Tags Source
SHA-256 checksum
How to use checksums
acfe49f289fba06cea6e883149fb5cbb975c7a7ae811745e0e2b3732b44d08d2
BLAKE2b-256 checksum
How to use checksums
2b24f64ae744e6b7693be080c4b0217d02b358232d0afe9a6cbafa13f847044b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release files / host_inspector-0.3.2-py3-none-any.whl

Download URL host_inspector-0.3.2-py3-none-any.whl
Size 72.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f437fc44aa6423a373fbbedd2fa548f39ab2546d7c8ceb5796e25a521dfa5785
BLAKE2b-256 checksum
How to use checksums
04110e52507acbf8eb1d146761602619e657eeb9fb7463aae08f0c8928418819
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.1

2 release files

0.1.0

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