This is a learning project, which can be considered as an example of how to authenticate the user with the Spotify API.
It is a simple but functional app that shows you your top 20 tracks and artists of the last 6 months.
First clone the repository and enter the directory:
git clone https://github.com/eplq/Spotify-Top-Artists-Tracks.git
cd Spotify-Top-Artists-Tracks
Login in the Spotify Developer Portal and create an application, then write the values in the .env file (use .env.example as template):
CLIENT_ID=<your client id>
CLIENT_SECRET=<your client secret>
REDIRECT_URI=<the redirect uri>
SCOPE=user-top-read
Then, create a Python virtual environment and install the dependencies:
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt
Finally, run the app:
flask --app uts.app --debug run
See LICENSE