def state(request): app = SpotifyApp() position = app.position() state = app.state() return {'position': position, 'state': state}