{"id":28225,"library":"spotifython","title":"Spotifython","description":"A caching Python interface to readonly parts of the Spotify API. Current version 0.2.12, requires Python >=3.10, with monthly releases. Provides simple access to Spotify data with built-in caching.","status":"active","version":"0.2.12","language":"python","source_language":"en","source_url":"https://github.com/vawvaw/spotifython","tags":["spotify","api","caching","readonly"],"install":[{"cmd":"pip install spotifython","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP requests to Spotify API","package":"requests","optional":false},{"reason":"Caching of API responses","package":"cachetools","optional":false}],"imports":[{"note":"","wrong":"","symbol":"Spotify","correct":"from spotifython import Spotify"}],"quickstart":{"code":"import os\nfrom spotifython import Spotify\n\nclient_id = os.environ.get('SPOTIFY_CLIENT_ID', '')\nclient_secret = os.environ.get('SPOTIFY_CLIENT_SECRET', '')\nspotify = Spotify(client_id=client_id, client_secret=client_secret)\ntrack = spotify.track('4cOdK2wGLETKBW3PvgPWqT')\nprint(track['name'])","lang":"python","description":"Initialize with credentials and fetch a track by ID."},"warnings":[{"fix":"Use other libraries (e.g., spotipy) for write operations.","message":"API is readonly: only GET endpoints are supported. No playback control or playlist modification.","severity":"gotcha","affected_versions":"all"},{"fix":"Pass a valid client_id and client_secret from Spotify Developer Dashboard.","message":"Client credentials flow only. User-specific tokens not supported; endpoints requiring user authentication (e.g., user playlists) are limited.","severity":"gotcha","affected_versions":"all"},{"fix":"Use specific methods like spotify.track() where possible.","message":"Search endpoint may return inconsistent results due to API version changes.","severity":"deprecated","affected_versions":"0.2.10+"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Set SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET in your environment or pass them directly.","cause":"Missing or incorrect SPOTIFY_CLIENT_ID or SPOTIFY_CLIENT_SECRET environment variables.","error":"spotifython.exceptions.SpotifythonException: Invalid client id"},{"fix":"Verify the search query and ensure it's correctly spelled.","cause":"Search returned no results or malformed response.","error":"KeyError: 'id'"},{"fix":"Run 'pip install spotifython' in your active Python environment (Python >=3.10).","cause":"Package not installed or installed in wrong environment.","error":"ModuleNotFoundError: No module named 'spotifython'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}