You will use your Spotify account credentials to sign in. When you are signed in you will then have the option to ‘Create an App’.

Image for post

Photo by the author

nce you create an app you will see your Client ID and Client Secret. We will need these to generate an access token that we will use to pull in data from the API.

We will break our code up into three separate scripts. One will be an API client to access the API, one will call the client and generate an interface in Streamlit and one will be used to help with the look of the Streamlit interface.

Building out the API Client script

Our goal is to create a class that will allow us to easily make API calls.

To help guide us through building out the class we will follow through the authorization guide on the Spotify Developers page.

https://developer.spotify.com/documentation/general/guides/authorization-guide/

#python #streamlit #spotify #data-science #spotipy

How to Utilize Spotify’s API and Create a User Interface in Streamlit
3.75 GEEK