Spotify Playlist Tool
A command-line interface (CLI) for managing and filtering Spotify playlists using the Spotify Web API. Export to JSON, filter by artist or mood, randomize tracks, and avoid duplicates—all with a single command.
Features
- Export from or import to JSON
- Filter by:
- Artist name
- Release date (
--after,--before) - Audio features: tempo, energy, valence, danceability
- Shuffle or sort tracks
- Avoid re-adding duplicates
- Resolves playlist names (auto-creates if not found)
- Safety protection with
--force
Installation
Clone the repository and install with pip:
git clone https://github.com/gretchycat/spotify_playlist_tool.git
cd spotify_playlist_tool
pip install .
Usage
spotify_playlist_tool --source liked --dest "My Mood Booster" --random --min_valence 0.6 --nodup
Command-line Options
--source— Spotify playlist ID, name,liked, or a local JSON file--dest— Playlist ID, name, or JSON file--artist— Filter by artist name--after/--before— Filter by release date (YYYY-MM-DD)--min_tempo,--max_energy,--min_valence, etc. — Filter by audio features--sort— Sort byalpha,artist, ordate--random— Shuffle output tracks--nodup— Prevent adding duplicates--force— Allow operations where source and dest are the same
License
This project is licensed under the MIT License.
Metadata
Release files for spotify-playlist-tool 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spotify_playlist_tool-0.1.0.tar.gz | 4.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spotify_playlist_tool-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.7 kB
Release files / spotify_playlist_tool-0.1.0.tar.gz
| Download URL | spotify_playlist_tool-0.1.0.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
544d4e8dacd722debb26e945892e6c952358d4e4c5f27d9d5d5d10d58ed95a10
|
|
BLAKE2b-256 checksum How to use checksums |
e6fb1f1c0edd599c6684a4bce96a7c5d39c92d7486f89985291c2b27450508c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / spotify_playlist_tool-0.1.0-py3-none-any.whl
| Download URL | spotify_playlist_tool-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b53c5517ae1c3e79f7064f71ff4e6f73a8579d6931dcec049e4294f5822d7591
|
|
BLAKE2b-256 checksum How to use checksums |
c494155ab2b1959db5b08a03b957a136747cba8a7744a9772422950ba5949f36
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|