#!/usr/bin/env python import time import md5 import random def generate_guid(): time_format = '%Y%m%d%H%M%S' to_hash = time.strftime(time_format) + str(random.random()) return md5.new(to_hash).hexdigest()