import uuid


def get_random_string(length: int = 32) -> str:
    """
    This function returns an alphanumeric string of the requested length.

    :param int length: the length of the random string. Max of 32 characters
    :returns: a random string
    :rtype: str
    """
    if length > 32:
        length = 32
    elif length <= 0:
        length = 1
    random_string = uuid.uuid4().hex
    return random_string[:length]