spotipy/examples/client_credentials_flow.py

11 lines
288 B
Python
Raw Normal View History

2015-04-01 14:03:29 +00:00
from spotipy.oauth2 import SpotifyClientCredentials
import spotipy
import pprint
client_credentials_manager = SpotifyClientCredentials()
sp = spotipy.Spotify(client_credentials_manager=client_credentials_manager)
search_str = 'Muse'
result = sp.search(search_str)
pprint.pprint(result)