eplq / Spotify-Top-Artists-Tracks

An example showing how to use the Spotify API using Python and Flask

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Learning how to use the Spotify Auth

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.

How to use

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

License

See LICENSE

About

An example showing how to use the Spotify API using Python and Flask

License:MIT License


Languages

Language:Python 82.7%Language:HTML 15.6%Language:Shell 1.7%