py-deviceid
A simple Python library (current version 0.1.1, released March 2025) designed to retrieve or generate a unique device ID for a system. It adheres to the DevDeviceId specification, offering a consistent identifier across various platforms. The project's release cadence appears to be infrequent.
Warnings
- gotcha The library provides a device ID based on the DevDeviceId specification. This may differ from other device identifiers (e.g., MAC addresses, hardware serials, or UUIDs generated by Python's `uuid` module) and might not align with user expectations if a different 'device ID' definition is assumed.
- gotcha As of version 0.1.1, the library's development appears to be in an early stage with infrequent updates since its last release in March 2025. This could imply limited platform coverage, or potential for future API changes in later major versions, though none are explicitly documented as breaking in the current version.
Install
-
pip install py-deviceid
Imports
- get_device_id
from deviceid import get_device_id
Quickstart
from deviceid import get_device_id
device_id = get_device_id()
print(f"Device ID: {device_id}")