Skip to main content

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 Info

Coverage

Overview

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.

Installation

Install Host Info:

uv add host-inspector
# via pip
python3 -m pip install host-inspector

Development

To get a list of all commands with descriptions simply run make.

make env
make pip_install_editable

Testing

make pytest
make coverage
make open_coverage

Issues

If you experience any issues, please create an issue.

Example Usage

from host_inspector import get_device_info
from host_inspector import get_health_info

print(get_device_info())
print(get_health_info())

# You can also call individual methods:
from host_inspector import get_cpu_info
from host_inspector import get_datetime_info
from host_inspector import get_disk_info
from host_inspector import get_gpu_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

Use with Caution!

To access system services we need to allow passwordless use of specific executables. You should know the security implications of doing this so use at your own risk.

Linux

Use sudo visudo to add the following lines:

%sudo ALL=(ALL) NOPASSWD: /usr/sbin/ufw
%sudo ALL=(ALL) NOPASSWD: /usr/sbin/dmidecode

Save and exit the file (:wq!). Then do:

History

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.

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

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

host_inspector-0.2.4.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

host_inspector-0.2.4-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

Details for the file host_inspector-0.2.4.tar.gz.

File metadata

  • Download URL: host_inspector-0.2.4.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for host_inspector-0.2.4.tar.gz
Algorithm Hash digest
SHA256 0a8e405860a661d272ffe179ae8a426893a576346575ed084c18dc85568edadd
MD5 b21524856740fbab71993bbf9ac2b133
BLAKE2b-256 80942aa44a10b6e8a2a18df49f1b1d0462c3cae8681f9e43e0a078fb6d704852

See more details on using hashes here.

File details

Details for the file host_inspector-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: host_inspector-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 31.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for host_inspector-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2abd9e5d9ecefe02173045787b6a42a71b9ba855a9c8844eb42d87cffc7528c3
MD5 4dbe40cbd9dddcb253fffba80c9ecd7c
BLAKE2b-256 0090f65e841c2d704435646a6ca0c1d8b39467ff2c1420630d6f476cc4bfe88f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page