Modules

An overview of the modules that make up hwid. The API reference below is generated automatically from the source docstrings.

Public API (hwid.core)

The package exposes hwid.get_hwid() at the top level.

Core functionality for getting hardware IDs.

hwid.core.validate_hwid(value)[source]

Validate if a string matches the HWID format.

Parameters:
  • value – The string to validate.

  • value (str)

Returns:

True if valid, False otherwise.

Return type:

bool

hwid.core.get_hwid()[source]

Get the hardware ID of the current machine.

Returns:

The hardware ID string.

Return type:

str

Raises:

Exceptions (hwid.exceptions)

Exceptions for the HWID package.

exception hwid.exceptions.UnsupportedOSError[source]

Bases: Exception

Raised when the operating system is not supported.

exception hwid.exceptions.InvalidHWIDError[source]

Bases: Exception

Raised when the hardware ID is invalid.

Logging (hwid.logger)

Logging module for HWID.