def create_user(username, email=None, password=None):
    """
    Adds a new user to the SQLAlchemy datastore

    Arguments
    ---------
    username: string
        Username to create

    Returns
    -------
    result: boolean
        True/False indicating status of delete operation
    """
    if User.query.filter_by(username=username).first():
        logger.debug('User already exists')
        return False
    else:
        user = User(username=username, email=email,
                    password=password, is_admin=False)
        db.session.add(user)
        db.session.commit()
        logger.debug('New user added')
        return True

    Adds a new user to the SQLAlchemy datastore

    Arguments
    ---------
    username: string
        Username to create

    Returns
    -------
    result: boolean
        True/False indicating status of delete operation
    
crackq/cq_api.py