https://github.com/gkeep/spotify-stats
Top 10 played tracks from Spotify, built with PyQt5 and spotipy
https://github.com/gkeep/spotify-stats
pyqt5 python spotify spotipy
Last synced: 11 months ago
JSON representation
Top 10 played tracks from Spotify, built with PyQt5 and spotipy
- Host: GitHub
- URL: https://github.com/gkeep/spotify-stats
- Owner: gkeep
- License: mit
- Created: 2021-10-14T18:05:15.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-04T14:02:32.000Z (over 2 years ago)
- Last Synced: 2025-02-21T16:59:28.968Z (over 1 year ago)
- Topics: pyqt5, python, spotify, spotipy
- Language: Python
- Homepage:
- Size: 249 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# spotify-stats
Spotify-stats is a small program made to display your top 10 tracks and artists from last 4 weeks (*short term*), last 6 months (*medium term*) and all time (*long term*).

**Libraries used**:
1. PyQt5
2. [Spotipy](https://spotipy.readthedocs.io/) - Python library for the Spotify Web API
## Data locations
- Config location: `$HOME/.config/spotify-stats/config`
- Cache location: `$HOME/.cache/spotify-stats`
- Logs location: `$HOME/.cache/spotify-stats/log/spotify-stats.log`
## For developers
### Pre-requirements
Generate Client ID and Client Secret for your account:
1. Open [Spotify for Developers Dashboard](https://developer.spotify.com/dashboard)
2. Create a new app
3. Set callback URIs: default config uses `http://localhost:9090/callback`
4. Set Client ID and Client Secret (and callback URI, if you changed that) from the Developer Dashboard page to config file (`config.sample` or `$HOME/.config/spotify-stats/config`)
It is recommended to set up [pyenv](https://github.com/pyenv/pyenv) and virtualenv.
1. Install Python >= 3.6 using *pyenv*: `pyenv install 3.7.0`
2. Select installed version of Python in the repository folder: `pyenv local 3.7.0`
### Development
1. Install virtualenv and create new venv for the repository: `$(pyenv which python) -m pip install virtualenv`, `$(pyenv which python) -m virtualenv venv`
2. Activate virtualenv and install dependencies: `. venv/bin/activate`, `pip install -r requirements.txt`
- Install default config with `make install-cfg`
- Run the app with `python src/main.py config.sample`
- Build the app with `make build`
- Run the built binary with `make run`
## LICENSE
MIT license. See [LICENSE](LICENSE) for more information.