pyspotify provides a Python interface to Spotify’s online music streaming service.

Completion status

pyspotify is very usable, and implements most of the libspotify 0.0.8 API. The table below shows what is done and what is left to be done.

Subsystem Status
Error handling Complete
Session handling Complete
Link subsystem Complete
Track subsystem Complete
Album subsystem Complete
Artist subsystem Complete
Album browsing Complete
Artist browsing Complete
Image handling Incomplete
Search subsystem Complete
Playlist subsystem Incomplete
User handling Complete
Toplist handling Complete
Inbox subsystem Not available
Offline synchronization Not available


To use this package you will also need libspotify, which is available from Spotify.

You will need a Spotify Premium account. You will also need to apply for, and receive an API key from Spotify.


Debian package

For Ubuntu and Debian users, pyspotify can be found in the python-spotify package of the Mopidy APT archive.

Arch Linux package

Install the pyspotify-git package from the AUR.

Using Pip (latest stable release)

The pip program for installing Python packages is usually found in the python-pip package of your Linux distribution.

To install pyspotify, run:

sudo pip install -U pyspotify

To update an existing installation, simply use the same command.

Using Pip (latest development version)

To install the very latest git version of pyspotify:

sudo pip install -U pyspotify==dev

Using setuptools (latest git version)

You will have first to clone the git repository.

Then to install it:

sudo python install

Trying it out

Included with pyspotify is a simple program, examples/ Run this with your credentials and access to an API key, and it will let you browse and play from your playlists, conduct searches and play from Spotify URIs.