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:
A fair source 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())
Both id() and hashed_id() accept a winregistry: bool kwarg,
which can be used to disable the registry query on Windows (enabled
by default). Depending on your security posture, disabling the
registry query may help prevent machine fingerprints from
being manually modified by a bad actor.
Testing
To run tests, invoke unittest:
python3 -m unittest
Building
To build a release, run:
python3 setup.py sdist bdist_wheel
Publishing
To publish a release, run:
twine upload dist/*
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_machineid-1.0.0.tar.gz.
File metadata
- Download URL: py_machineid-1.0.0.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a902a00fae8c6d6433f463697c21dc4ce98c6e55a2e0535c0273319acb0047a
|
|
| MD5 |
77b8727744fc6e3b890022d8d5721ef0
|
|
| BLAKE2b-256 |
f4b0c7fa6de7298a8f4e544929b97fa028304c0e11a4bc9500eff8689821bdbb
|
File details
Details for the file py_machineid-1.0.0-py3-none-any.whl.
File metadata
- Download URL: py_machineid-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
910df0d5f2663bcf6739d835c4949f4e9cc6bb090a58b3dd766e12e5f768e3b9
|
|
| MD5 |
21fec07621f5729f3216f97cd9df142b
|
|
| BLAKE2b-256 |
be761ed8375cb1212824c57eb706e1f09f3f2ca4ed12b8d56b28a160e2d53505
|