I want to generate a unique value, or uuid, (I do not care if it is a number or hex) for some script produced documents in a python3 script, but this should be unique between multiple executions of the script.
etc. The script might run every two (2) or three (3) days. I do not want to get the same uuid twice.
A simple yet practical way I thought of is using the epoch time (since the script won't run twice at the same second) and the machine it will be running will be 64bit (2038 problem), but it seems to simple to be foolproof.
Another way to achieve this would be to use uuid4(). Will this be unique between executions and different machines?
uuid4()
is cryptographically guaranteed to be unique. In practice, you can go so far as to assume that every UUID ever generated is unique.
I refer you to this: How unique is UUID?