    def valid_user(self, username):
        # type: (str) -> bool
        '''
        Validates a username to be valid.
        '''
        if len(username.split()) != 1:
            return False
        try:
            self.user_lookup_by_name(username)
            return True
        except SecurityBotException as e:
            logging.warn('{}'.format(e))
            return False
Validates a username to be valid.
securitybot/bot.py