def uuid3(namespace, name):
 try:
  from hashlib import md5
 except ImportError:
  from md5 import md5
 hash = md5((namespace.bytes + name)).digest()
 return UUID(bytes=hash[:16], version=3)

def uuid3 ( namespace , name ) : try : from hashlib import md5 except ImportError : from md5 import md5 hash = md5 ( ( namespace . bytes + name ) ) . digest ( ) return UUID ( bytes = hash [ : 16 ] , version = 3 )
generate a uuid from the md5 hash of a namespace uuid and a name .