Spotify REST API from Python via the Spotipy library Some examples of invoking the Spotify REST API from Python using the Spotipy library. Put a valid Spotify access token in the token.txt file before running, and a userid in the userid.txt file for user-specific processing.