import secrets


def gen_password(length=8,
                 charset="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
                 "0123456789!@#$%^&*()"):
    """Generate user password."""
    return "".join([secrets.choice(charset) for _ in range(0, length)])