Registry / http-networking / spotifywebapi

spotifywebapi

JSON →
library1.2.8pypypi✓ verified 80d ago

A simple Python wrapper for the Spotify Web API. Current version 1.2.8, supports Python >=3.6. Released under MIT license, maintained on GitHub. Release cadence is irregular.

pip install spotifywebapi
INSTALL
IMPORT
SIG · SPOTIFYWEBAPI
S
spotifywebapi
http-networkingpythonv1.2.8
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.

Spotify
from spotifywebapi import Spotify
from spotifywebapi import SpotifyAPI

Initialize API with credentials, authenticate, then use get_track etc.

from spotifywebapi import SpotifyAPI api = SpotifyAPI(client_id='YOUR_CLIENT_ID', client_secret='YOUR_CLIENT_SECRET') api.authenticate() track = api.get_track('6y0igZArWVi3k3N9S20QXN') print(track)
Debug
Known issues
gotchaAlways call authenticate() before making API calls. The library does not auto-refresh tokens.
fix
Make sure to call api.authenticate() after creating the instance.
affects: all
gotchaThe library uses Spotify's Client Credentials Flow only. It does not support Authorization Code flow for user-specific endpoints.
fix
Use another library like spotipy if you need user authorization.
affects: <2.0 (if ever 2.0 changes this)
deprecatedPython 3.6 support may be deprecated in future releases.
fix
Upgrade to Python 3.8+ for future compatibility.
affects: >=1.2.8
Upgrade
Version history
1.2.8latest on PyPI · released May 21, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
23 hits · last 30 days
node
22
OpenAI (training)
1
Resources
spotifywebapi — pip install spotifywebapi · libregistry