Registry / communication / spotrpy

spotrpy

JSON →
library4.1pypypiunverified

A simple Spotify tool for the terminal that allows searching, playing, and managing Spotify playlists and tracks. Current version 4.1, released with Python >=3.6 support. Maintenance cadence is irregular.

pip install spotrpy
INSTALL
IMPORT
SIG · SPOTRPY
S
spotrpy
communicationpythonv4.1
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.

Spotr
from spotrpy import Spotr
from spotr import Spotr

Initialize Spotr with credentials from environment variables.

from spotr import Spotr import os sp = Spotr(client_id=os.environ.get('SPOTIFY_CLIENT_ID', ''), client_secret=os.environ.get('SPOTIFY_CLIENT_SECRET', ''), redirect_uri='http://localhost:8888/callback') # Then use sp methods like sp.search('song')
spotrpy --version
Debug
Known issues
breakingspotrpy v4.0+ dropped support for Python 3.5 and below. Requires >=3.6.
fix
Upgrade Python to 3.6+ or pin spotrpy to <4.0.
affects: >=4.0
gotchaclient_id and client_secret are required; if not provided, Spotr will raise an error.
fix
Always set SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET environment variables or pass them to constructor.
affects: all
gotchaThe redirect_uri must match exactly what is registered in Spotify Developer Dashboard. Usually http://localhost:8888/callback
fix
Register the exact redirect URI in your Spotify app.
affects: all
Upgrade
Version history
4.1latest on PyPI · released Aug 16, 2024
Audit
Dependencies
spotipyrequiredCore dependency for Spotify API interaction
clickrequiredCLI interface
Agent activity
35 hits · last 30 days
node
30
OpenAI (training)
1
Resources
spotrpy — pip install spotrpy · libregistry