Skip to content

Latest commit

 

History

History
56 lines (40 loc) · 1.3 KB

README.rst

File metadata and controls

56 lines (40 loc) · 1.3 KB

spotifython

A readonly wrapper for the Spotify API that relies on heavy caching to minimise the number of requests.

Key Features

  • caching requested data (note that non public data will be cached)

Installation

python 3.10 or higher is required

# Linux/macOS
python3 -m pip install -U spotifython
# Windows
py -3 -m pip install -U spotifython

To install the development version, run:

$ git clone https://github.com/vawvaw/spotifython
$ cd spotipython
$ python3 -m pip install -U .

Quick Example

import spotifython

if __name__ == "__main__":
    scope = spotifython.Scope(playlist_read_private=True, user_library_read=True)
    authentication = spotifython.Authentication(
        client_id="client_id",
        client_secret="client_secret",
        scope=scope
    )
    client = spotifython.Client(authentication=authentication)

    playlists = client.user_playlists()
    for playlist in playlists:
        print(playlist.name)

    client.close()

Links