import string
import random


def generateRandomKey(size=20, chars=string.ascii_uppercase + string.digits):
    """
        Generates a random key of a certain length, based on a given pool of characters
        size - the lenght of the random key
        chars - the pool of characters from which to pool each item
    """
    return ''.join(random.choice(chars) for x in range(size))