1


my application need use python generate a constant Unique id for run machine.
the constant Unique id mean is :
anytime in the same machine ,generate Unique id is always the SAME Unique id.

(maybe like system uuid,but my application not run root,cant't get system-uuid).
btw,i think python uuid model not good for me:
uuid1():use time,gen a uuid,this is not a constant Unique id
uuid3():cant use some string gen a uuid,but this uuid same in any machine.



Thanks!

the same machine: The same cpu+motherboard+OS instalation+same disk. action :
uuid1():use time gen a uuid,this is not a constant Unique id

bend chen
  • 69
  • 4

1 Answers1

1

You could try snowflake. If you have root, the ID can be persistent for the whole machine; otherwise, it can just save the ID in a file you have permission to create.

Disclosure: I wrote it. :)

Shaddi
  • 313
  • 1
  • 3
  • 8