import string
import random


def get_random_string(uppercase=True, alphanum=True, length=32):
    """ Generate random strings.

        :param uppercase: include uppercase characters
        :param alphanum: include numbers
        :param length: result length
    """
    if uppercase:
        symbols = string.ascii_letters
    else:
        symbols = string.ascii_lowercase
    if alphanum:
        symbols += string.digits
    return u''.join([random.choice(symbols) for _ in range(length)])