Format for the file is:
    
         credentials:
             email: ...
             api_token: ...
    
    :param filename: The filename to parse
    :return: A tuple with:
                - email
                - api_token

def _parse_config_file_impl(filename):
    """
    Format for the file is:
    
         credentials:
             email: ...
             api_token: ...
    
    :param filename: The filename to parse
    :return: A tuple with:
                - email
                - api_token
    """
    api_key = None
    email = None

    try:
        doc = yaml.load(file(filename).read())
        
        email = doc['credentials']['email']
        api_key = doc['credentials']['api_key']
    except (KeyError, TypeError):
        print(INVALID_FILE)
        return None, None

    except yaml.scanner.ScannerError, e:
        print(SYNTAX_ERROR_FILE % (e.problem, e.problem_mark.line))
        return None, None

    # Just in case, we don't want the auth to fail because of a space
    email = email.strip()
    api_key = api_key.strip()

    if not is_valid_api_key(api_key):
        cli_logger.debug(INVALID_UUID)
        api_key = None

    if not is_valid_email(email):
        cli_logger.debug('Invalid email address: %s' % email)
        email = None

    return email, api_key