Get the unique machine ID of any host (without admin privileges)
Project description
py-machineid
Get the unique machine ID of any host (without admin privileges).
Sponsored by:
An open, source-available software licensing and distribution API.
Install
Install using pip
:
python3 -m pip install py-machineid
Usage
To obtain the raw GUID of the device, use id() -> str
:
import machineid
print(machineid.id())
To obtain an anonymized (hashed) version of the GUID, see below. The
hashed_id(str) -> str
function takes an optional application ID,
which will ensure a unique ID per-app for the same device.
import machineid
print(machineid.hashed_id('myappid'))
print(machineid.hashed_id())
Testing
To run tests, invoke unittest
:
python3 -m unittest
Thanks
Special thanks to Denis Brodbeck for his Go package, machineid
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-machineid-0.4.4.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for py_machineid-0.4.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 060d7df1f3470bed542f56719b0d55d371d122a7779184ab853083ee26d51208 |
|
MD5 | d6b6590479b8b3fd152d2adf2007521c |
|
BLAKE2b-256 | 66b0613422fb18d26991813c37dcf41f3da7f50d1233cccd1bab5ef280f0d322 |