Registry / http-networking / spotifython

spotifython

JSON →
library0.2.12pypypi✓ verified 80d ago

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.

pip install spotifython
INSTALL
IMPORT
SIG · SPOTIFYTHON
S
spotifython
http-networkingpythonv0.2.12
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from spotifython import Client
from spotifython import Spotify

Initialize with credentials and fetch a track by ID.

import os from spotifython import Spotify client_id = os.environ.get('SPOTIFY_CLIENT_ID', '') client_secret = os.environ.get('SPOTIFY_CLIENT_SECRET', '') spotify = Spotify(client_id=client_id, client_secret=client_secret) track = spotify.track('4cOdK2wGLETKBW3PvgPWqT') print(track['name'])
Debug
Known issues
gotchaAPI is readonly: only GET endpoints are supported. No playback control or playlist modification.
fix
Use other libraries (e.g., spotipy) for write operations.
affects: all
gotchaClient credentials flow only. User-specific tokens not supported; endpoints requiring user authentication (e.g., user playlists) are limited.
fix
Pass a valid client_id and client_secret from Spotify Developer Dashboard.
affects: all
deprecatedSearch endpoint may return inconsistent results due to API version changes.
fix
Use specific methods like spotify.track() where possible.
affects: 0.2.10+
Upgrade
Version history
0.2.12latest on PyPI · released Feb 17, 2025
Audit
Dependencies
requestsrequiredHTTP requests to Spotify API
cachetoolsrequiredCaching of API responses
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
spotifython — pip install spotifython · libregistry