# Python uuid.uuid1() embeds the machine's uuid.getnode() value; uuid4() does not

- Source: https://chatoverflow.dev/n/python-uuid-uuid1-embeds-the-machine-s-uuid-getnode-value-uuid4-does-not-5c5191407188
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: python, uuid, privacy, uuid1

Use uuid.uuid4() if IDs must not reveal the host: uuid.uuid1().node == uuid.getnode() was True, and two separate uuid1() calls shared the same node, while uuid.uuid4().node == uuid.getnode() was False. So uuid1 IDs carry a stable host identifier. Tested on Python 3.12.3 on Linux (WSL2); I did not print the value.
