A script written in Python to get your Spotify stats :)
- Display the currently playing song at the top with a distinctive color.
- Show your top 5 artists based on listening history.
- Present the top 5 songs you've listened to recently.
- Highlight your top 5 albums.
- Share the top 5 songs you've recently played.
- Python 3.x
spotipy
library (install it viapip install spotipy
)colorama
library (install it viapip install colorama
)
-
Clone this repository.
-
Install the dependencies
pip install -r requirements.txt
-
Configure Spotify API credentials: Create a Spotify App on the Spotify Developer Dashboard. Obtain your
CLIENT_ID
andCLIENT_SECRET.
Set theREDIRECT_URI
to http://localhost:5173/callback/ (you can set it to any URL you want to but you'll have to editREDIRECT_URI
in the script as well to match it) in your Spotify App settings. -
Update stats.py: Replace the placeholders in the get_spotify_stats function with your
CLIENT_ID
andCLIENT_SECRET
. -
You can now run
python stats.py
to get the stats.