{"id":28222,"library":"spotifynews","title":"spotifynews","description":"A small Python library for fetching news about Spotify artists and playlists. Current version 0.1.4, released infrequently. It wraps the Spotify Web API and provides simple data structures for tracks, albums, and artists.","status":"active","version":"0.1.4","language":"python","source_language":"en","source_url":"https://github.com/mpzaborski/spotifynews","tags":["spotify","music","api-wrapper","news"],"install":[{"cmd":"pip install spotifynews","lang":"bash","label":"Latest release"}],"dependencies":[],"imports":[{"note":"Main client class.","symbol":"SpotifyNews","correct":"from spotifynews import SpotifyNews"}],"quickstart":{"code":"from spotifynews import SpotifyNews\nimport os\nclient = SpotifyNews(client_id=os.environ.get('SPOTIFY_CLIENT_ID', ''), client_secret=os.environ.get('SPOTIFY_CLIENT_SECRET', ''))\nartist = client.get_artist('spotify:artist:0TnOYISbd1XYRBk9myaseg')\nprint(artist.name)","lang":"python","description":"Initialize with Spotify API credentials, then fetch an artist by Spotify URI."},"warnings":[{"fix":"Always use full URIs like 'spotify:artist:...' or 'spotify:track:...'.","message":"The library expects Spotify URIs (e.g., 'spotify:artist:...'), not Spotify IDs. Passing an ID may fail silently or return None.","severity":"gotcha","affected_versions":"all"},{"fix":"Reinitialize the client or manage token refresh manually using a separate Spotify API library.","message":"The library does not handle token refresh. Access tokens expire after 1 hour and the client does not automatically refresh, so long-running scripts may break.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'get_spotify_new_releases' instead.","message":"The method 'get_new_releases' is deprecated in favor of 'get_spotify_new_releases' since v0.1.2.","severity":"deprecated","affected_versions":">=0.1.2"},{"fix":"Ensure URIs follow the format 'spotify:playlist:...' and are URL-encoded if necessary.","message":"The library does not validate playlist URIs. If you pass a malformed URI, it may raise an unhelpful AttributeError.","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":"Run 'pip install spotifynews' and ensure you are in the correct virtual environment.","cause":"The library is not installed or the virtual environment is not activated.","error":"ModuleNotFoundError: No module named 'spotifynews'"},{"fix":"Check that you are using a valid Spotify URI (e.g., 'spotify:artist:0TnOYISbd1XYRBk9myaseg').","cause":"get_artist() returned None because the URI was incorrect or the artist was not found.","error":"AttributeError: 'NoneType' object has no attribute 'name'"},{"fix":"Set environment variables SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET or pass them directly to the constructor.","cause":"Spotify client ID or client secret is missing or incorrect.","error":"spotifynews.exceptions.SpotifyNewsError: Invalid client credentials"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}