Python How to Generate GUID Or UUID with Examples
This turorial explains How to generate Unique Id in Python with examples.
Python Random Unique Id Generate
First install uuid module using pip
tool
pip install uuid
import uuid
print(uuid.uuid1())
id=uuid.uuid4()
print(type(id))
print(id)
Output:
0f137c5b-6f12-11ee-959d-9457a5dba7fb
<class 'uuid.UUID'>
e1319278-2fc4-4886-83cd-c2490a4cc637