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.
pip install py-deviceidVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to retrieve the unique device ID for the current system using the `get_device_id` function.
Understand the 'DevDeviceId' specification or consider alternative methods if a different type of device identifier is required.
Review the GitHub repository for recent activity and consider pinning the package version to avoid unexpected changes if future updates occur.
First, ensure the library is installed: `pip install py-deviceid`. Then, correct the import statement to use the module name: `from deviceid import DeviceID`.
Create an instance of the `DeviceID` class before calling its method: `from deviceid import DeviceID device_id_instance = DeviceID() device_id = device_id_instance.get_device_id()`
Verify the correct class name is `DeviceID` (with capital 'D' and 'ID'). If the name is correct, try reinstalling the package: `pip uninstall py-deviceid && pip install py-deviceid`. Ensure no local file is named `deviceid.py` that might be shadowing the installed package.
No dependency data recorded yet.