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.
Metadata
Release files for py-machineid 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| py_machineid-1.0.0.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| py_machineid-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / py_machineid-1.0.0.tar.gz
| Download URL | py_machineid-1.0.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a902a00fae8c6d6433f463697c21dc4ce98c6e55a2e0535c0273319acb0047a
|
|
BLAKE2b-256 checksum How to use checksums |
f4b0c7fa6de7298a8f4e544929b97fa028304c0e11a4bc9500eff8689821bdbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / py_machineid-1.0.0-py3-none-any.whl
| Download URL | py_machineid-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
910df0d5f2663bcf6739d835c4949f4e9cc6bb090a58b3dd766e12e5f768e3b9
|
|
BLAKE2b-256 checksum How to use checksums |
be761ed8375cb1212824c57eb706e1f09f3f2ca4ed12b8d56b28a160e2d53505
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|