def _generate_id(size=6, chars=string.ascii_uppercase + string.digits):
        return ''.join(random.choice(chars) for _ in range(6))
Thank you StackOverflow: http://stackoverflow.com/a/2257449/242129
dataset/ETHPy150Open JohnMaguire/Cardinal/cardinal/plugins.py/EventManager._generate_id