A light weight Python library for the Spotify Web API
Go to file
Paul Lamere 802c4b4354 Merge pull request #4 from hugovk/patch-1
Remove duplicate version history
2014-05-19 17:00:32 -04:00
examples UI tweak to oauth example 2014-05-19 07:24:09 -04:00
spotipy Added paging support and example. 2014-05-19 06:49:08 -04:00
tests Updated search tests to match updated api 2014-05-16 14:02:33 -04:00
.gitignore Add Travis CI and .gitignore 2014-04-05 21:19:24 +03:00
.travis.yml Run the examples (without coverage) 2014-04-05 22:00:47 +03:00
deploy first commit 2014-04-05 09:12:01 -04:00
README.md Version number 2014-05-19 06:56:04 -04:00
setup.py Repackaged for saner imports 2014-05-18 07:08:51 -04:00

Spotipy - a Python client for The Spotify API

Description

Spotipy is a thin client library for the Spotify Web API .

Installation

If you already have Python on your system you can install the library simply by downloading the distribution, unpack it and install in the usual fashion:

python setup.py install

Dependencies

  • Requests - spotipy requires the requests package to be installed

Quick Start

To get started:

  • Install spotipy

  • Create a Spotify object

    sp = spotipy.Spotify()

Call methods:

tracks = sp.search(q='weezer', limit=20)
for i, t in enumerate(tracks['tracks']):
    print ' ', i, t['name']

A full set of examples can be found in the Spotipy examples directory

Supported Methods

  • track - gets info for a single track
  • tracks - gets info for multiple tracks
  • album - gets info for a single album
  • albums - gets info for a set of albums
  • artist - gets info for an artist
  • artists - gets info for a set of artists
  • artist_albums - gets info about an artist's albums
  • artist_top_tracks - gets info about an artist's top tracks
  • user - gets profile info for a user
  • search - searches for artists, albums or tracks
  • simple oauth flow

Refer to the Spotify API documentation for details on the methods and parameters.

Methods that take item IDs (such as the track, album and artist methods) accept URN, URL or simple ID types. The following 3 ids are all acceptable IDs:

    - http://open.spotify.com/track/3HfB5hBU0dmBt8T0iCmH42
    - spotify:track:3HfB5hBU0dmBt8T0iCmH42
    - 3HfB5hBU0dmBt8T0iCmH42

Reporting Issues

If you have suggestions, bugs or other issues specific to this library, file them here or contact me at paul@echonest.com. Or just send me a pull request.

Version

  • 1.0 - 04/05/2014 - Initial release
  • 1.1 - 05/18/2014 - Repackaged for saner imports