Top 10 played tracks from Spotify, built with PyQt5 and spotipy
This repository has been archived on 2025-08-12. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
dependabot[bot] 6383e50b69
Bump urllib3 from 1.26.17 to 1.26.18 (#9)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 1.26.17 to 1.26.18.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.17...1.26.18)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-04 17:02:28 +03:00
image Add README.md 2021-12-06 10:45:54 +03:00
src Fix sys.argv 2021-12-16 23:37:11 +03:00
ui Add build via cx_Freeze (#1) 2021-12-10 01:18:19 +03:00
util Fix config copying 2021-12-26 14:46:17 +03:00
.gitignore Remove private API keys from config.sample 2021-12-23 09:47:31 +03:00
config.sample Remove private API keys from config.sample 2021-12-23 09:47:31 +03:00
LICENSE Initial commit 2021-10-14 21:05:15 +03:00
Makefile Print log after running the program 2021-12-11 01:24:40 +03:00
README.md Add pre-requirements to README 2021-12-23 00:06:29 +03:00
requirements.txt Bump urllib3 from 1.26.17 to 1.26.18 (#9) 2024-02-04 17:02:28 +03:00
setup.py Add hidden import 2021-12-11 01:24:18 +03:00

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).

Top 10 tracks screenshot

Libraries used:

  1. PyQt5
  2. Spotipy - 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
  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 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 for more information.