Skip to main content

A CLI tool for managing Spotify playlists.

Project description

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.

MIT License

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 by alpha, artist, or date
  • --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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spotify_playlist_tool-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spotify_playlist_tool-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file spotify_playlist_tool-0.1.0.tar.gz.

File metadata

  • Download URL: spotify_playlist_tool-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for spotify_playlist_tool-0.1.0.tar.gz
Algorithm Hash digest
SHA256 544d4e8dacd722debb26e945892e6c952358d4e4c5f27d9d5d5d10d58ed95a10
MD5 4a80d2831edaec5581bade197a7c6153
BLAKE2b-256 e6fb1f1c0edd599c6684a4bce96a7c5d39c92d7486f89985291c2b27450508c0

See more details on using hashes here.

File details

Details for the file spotify_playlist_tool-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for spotify_playlist_tool-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b53c5517ae1c3e79f7064f71ff4e6f73a8579d6931dcec049e4294f5822d7591
MD5 811c881f4d751074d6f6c16d24f44710
BLAKE2b-256 c494155ab2b1959db5b08a03b957a136747cba8a7744a9772422950ba5949f36

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page