Skip to main content

Get the unique machine ID of any host (without admin privileges)

Project description

py-machineid

CI PyPI version

Get the unique machine ID of any host (without admin privileges).

Sponsored by:

Keygen

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


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)

Uploaded Source

Built Distribution

py_machineid-0.4.4-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page