{"id":28213,"library":"spotify-utils","title":"spotify-utils","description":"A CLI and TUI tool for various Spotify utility tasks like playlist management, export, and import. Current version 2.0.1, released Sep 2025. Active development with frequent minor releases.","status":"active","version":"2.0.1","language":"python","source_language":"en","source_url":"https://github.com/fabieu/spotify-utils","tags":["spotify","cli","tui","playlist","export"],"install":[{"cmd":"pip install spotify-utils","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core Spotify Web API client library","package":"spotipy","optional":false},{"reason":"CLI framework","package":"typer","optional":false},{"reason":"TUI and formatted output","package":"rich","optional":false}],"imports":[{"note":"SpotifyClient is exposed at the package level since v2.0.0","wrong":"from spotify_utils.client import SpotifyClient","symbol":"SpotifyClient","correct":"from spotify_utils import SpotifyClient"},{"note":"","wrong":null,"symbol":"PlaylistManager","correct":"from spotify_utils.playlist import PlaylistManager"}],"quickstart":{"code":"from spotify_utils import SpotifyClient\nimport os\n\nclient = SpotifyClient(\n    client_id=os.environ.get('SPOTIFY_CLIENT_ID', ''),\n    client_secret=os.environ.get('SPOTIFY_CLIENT_SECRET', ''),\n    redirect_uri=os.environ.get('SPOTIFY_REDIRECT_URI', 'http://localhost:8888/callback')\n)\n# List first 10 playlists\nplaylists = client.get_playlists(limit=10)\nfor pl in playlists:\n    print(pl['name'])","lang":"python","description":"Initialize client with Spotify OAuth credentials and fetch playlists."},"warnings":[{"fix":"Use `from spotify_utils import SpotifyClient` for v2.x.","message":"v2.0.0 renamed the main package from 'spotify_utils' to 'spotify_utils' (no change) but moved `SpotifyClient` to top-level import. Old import path `from spotify_utils.client import SpotifyClient` no longer works.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Review new template format in docs; old placeholders like `{{ track }}` should be `{{ track.name }}`.","message":"The `export` command format templates changed in v1.1.0. Old custom templates (Jinja2 based) may break if using deprecated placeholders.","severity":"deprecated","affected_versions":">=1.1.0"},{"fix":"Ensure `redirect_uri` in code matches the callback URL in your Spotify App settings.","message":"Spotify OAuth requires a redirect URI exactly matching the one registered in Spotify App Dashboard. Use `http://localhost:8888/callback` for local development.","severity":"gotcha","affected_versions":"all"},{"fix":"Implement exponential backoff or use the built-in retry mechanism (available since v1.0.14).","message":"Rate limits: Spotify API has a limit of 100 requests per 30 seconds. Bulk operations may fail silently if not handling HTTP 429.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install with `pip install spotify-utils` and import as `import spotify_utils`.","cause":"The package is named `spotify-utils` with a hyphen, but import uses underscore.","error":"ModuleNotFoundError: No module named 'spotify_utils'"},{"fix":"Use `from spotify_utils import SpotifyClient`.","cause":"SpotifyClient was moved to the top-level package in v2.0.0.","error":"ImportError: cannot import name 'SpotifyClient' from 'spotify_utils.client'"},{"fix":"Set the environment variables or pass them directly to the constructor. Verify credentials on Spotify Developer Dashboard.","cause":"Missing or incorrect SPOTIFY_CLIENT_ID / SPOTIFY_CLIENT_SECRET environment variables or parameters.","error":"spotify_utils.exceptions.AuthenticationError: Invalid client credentials"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}