Skip to content

Instantly share code, notes, and snippets.

@pythonjunkie
Created September 7, 2012 00:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pythonjunkie/3661720 to your computer and use it in GitHub Desktop.
Save pythonjunkie/3661720 to your computer and use it in GitHub Desktop.
Generate Unique Id
import os
def unique_id():
return os.urandom(10).encode('hex')
print " Printing Unique_id"
a=unique_id()
print a
OR
import uuid
print uuid.uuid4()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment