https://github.com/ni5arga/spotify-stats-python
A script written in Python to get your Spotify stats like top artists, songs, albums & more :)
https://github.com/ni5arga/spotify-stats-python
python spotify spotify-api spotify-cli spotify-stats spotipy
Last synced: 10 months ago
JSON representation
A script written in Python to get your Spotify stats like top artists, songs, albums & more :)
- Host: GitHub
- URL: https://github.com/ni5arga/spotify-stats-python
- Owner: ni5arga
- License: mit
- Created: 2023-12-08T02:38:29.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-08T03:08:13.000Z (about 2 years ago)
- Last Synced: 2024-05-01T13:37:32.979Z (almost 2 years ago)
- Topics: python, spotify, spotify-api, spotify-cli, spotify-stats, spotipy
- Language: Python
- Homepage:
- Size: 127 KB
- Stars: 30
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spotify-stats-python
A script written in Python to get your Spotify stats :)

## Features
- 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.
## Requirements
- Python 3.x
- `spotipy` library (install it via `pip install spotipy`)
- `colorama` library (install it via `pip install colorama`)
## Setup Instructions
1. Clone this repository.
2. Install the dependencies `pip install -r requirements.txt`
3. Configure Spotify API credentials:
Create a Spotify App on the Spotify Developer Dashboard.
Obtain your `CLIENT_ID` and `CLIENT_SECRET.`
Set the `REDIRECT_URI` to http://localhost:5173/callback/ (you can set it to any URL you want to but you'll have to edit `REDIRECT_URI` in the script as well to match it) in your Spotify App settings.
5. Update stats.py: Replace the placeholders in the get_spotify_stats function with your `CLIENT_ID` and `CLIENT_SECRET`.
6. You can now run `python stats.py` to get the stats.