SpotipyFree
A lightweight drop-in replacement for Spotipy without using the spotify api. This project was build because spotify removed access to its API for non-premium users. This project doesn't use ANY Spotify APIs.
Features
-
Drop-in style response compatible with
spotipy -
No Spotify account required
-
Returns playback data structured like the official Spotify API
Current Status
This project is experimental.
Currently implemented:
search()track()playlist()playlist_items()artist()artist_albums()album()album_tracks()current_user_recently_played()- must first run startRecentlyPlayedListenercurrent_user_saved_tracks()current_user_saved_tracks_contains()current_user_playlists()current_playback()current_user()me()seek_track()next_track()previous_track()start_playback()pause_playback()
There is also a feature to host the api as a Flask endpoint.
Installation
Bash
pip install spotipyFree
Usage without login
from SpotipyFree import Spotify
sp = Spotify()
search = sp.search("Blinding Light - Weekend")
artist = sp.artist("3Bd1cgCjtCI32PYvDC3ynO")
artistAlbums = sp.artist_albums("3Bd1cgCjtCI32PYvDC3ynO", include_groups="album,single,compilation")
playlist = sp.playlist_items("6lnfkAgnVtNzvj8KScLSkj")
track = sp.track("67Hna13dNDkZvBpTXRIaOJ")
album = sp.album("4m2880jivSbbyEGAKfITCa")
albumTracks = sp.album_tracks("4m2880jivSbbyEGAKfITCa")
Usage with login
sp = Spotify()
sp.login()
status = spotapi.player.PlayerStatus(sp.user_auth)
sp.startRecentlyPlayedListener()
state = status.state.__dict__
saved = sp.current_user_saved_tracks()
me = sp.me()
Usage with web API
Hosting the web api:
python -c "import SpotipyFree.web as web; web.runWebAPI()"
Using the web api
import json
import requests
BASE_URL = "http://127.0.0.1:5000"
url = f"{BASE_URL}/search"
response = requests.post(url, json=["Blinding Light - Weekend"])
print(f"Status: {response.status_code}")
print(response.json())
This project is in no way affiliated with Spotify.
Metadata
Release files for spotipyFree 1.9.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| spotipyfree-1.9.14.tar.gz | 16.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spotipyfree-1.9.14-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.0 kB
Release files / spotipyfree-1.9.14.tar.gz
| Download URL | spotipyfree-1.9.14.tar.gz |
|---|---|
| Size | 16.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43f491741a2e2cdc07b55df873f67b15918c1c0b95b95e8479b349dc0dcec52e
|
|
BLAKE2b-256 checksum How to use checksums |
f509a19ad878f0f3f8b8e9c98f03911008e3cf6105d3b22659397043e642d419
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / spotipyfree-1.9.14-py3-none-any.whl
| Download URL | spotipyfree-1.9.14-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ada3cb4f6402e26bbb9816c869d292f897cf12e4f8d44f977bf5aca1b3894164
|
|
BLAKE2b-256 checksum How to use checksums |
3a9a25a963d3bb8f3a5f75c838c7106df63a99aba0c984a6fca04b98425b3540
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|