spotify-bpm-splitter

App to split a Spotify list in children playlists sorted by tempo

MIT License

Stars
7

Spotify BPM splitter

This is a toy Python app to split a Spotify playlist in multiple children playlists sorted by tempo / BPM using the Spotify web API through spotipy.

Requirements

  1. pip install spotipy
  2. Spotify credentials. More info in the spotipy docs

Usage

Get the playlist URI by right-clicking on it on Spotify, go to Share and Copy Spotify URI. Pass it as an argument to the Python script:

$ JAZZ_URI="spotify:user:spotify:playlist:37i9dQZF1DWTR4ZOXTfd9K"
$ python splitter $JAZZ_URI

Caveats

  • You need to create a dummy Spotify app to get your authentication credentials
  • The Spotify API doesn't seem to return more than 100 songs from a playlist
  • Current bin size for the playlists is hard-coded to 10 BPM
  • The script doesn't check if a playlist exists already when running it a second time

Contributing

Contributions are welcome!