def login(self, username, password=None, remember_me=False, blob=None):

        username = utils.to_char(username)

        if password is not None:
            password = utils.to_char(password)
            blob = ffi.NULL
        elif blob is not None:
            password = ffi.NULL
            blob = utils.to_char(blob)
        else:
            raise AttributeError('password or blob is required to login')

        spotify.Error.maybe_raise(lib.sp_session_login(
            self._sp_session, username, password, bool(remember_me), blob))
Authenticate to Spotify's servers.
dataset/ETHPy150Open mopidy/pyspotify/spotify/session.py/Session.login