Skip to main content

A light weight Python library for the Spotify Web API

Project description

Spotipy

A light weight Python library for the Spotify Web API

Tests Documentation Status

Documentation

Spotipy's full documentation is online at Spotipy Documentation.

Installation

pip install spotipy

or upgrade

pip install spotipy --upgrade

Quick Start

A full set of examples can be found in the online documentation and in the Spotipy examples directory.

To get started, install spotipy and create an app on https://developers.spotify.com/. Add your new ID and SECRET to your environment:

Without user authentication

import spotipy
from spotipy.oauth2 import SpotifyClientCredentials

sp = spotipy.Spotify(auth_manager=SpotifyClientCredentials(client_id="YOUR_APP_CLIENT_ID",
                                                           client_secret="YOUR_APP_CLIENT_SECRET"))

results = sp.search(q='weezer', limit=20)
for idx, track in enumerate(results['tracks']['items']):
    print(idx, track['name'])

With user authentication

import spotipy
from spotipy.oauth2 import SpotifyOAuth

sp = spotipy.Spotify(auth_manager=SpotifyOAuth(client_id="YOUR_APP_CLIENT_ID",
                                               client_secret="YOUR_APP_CLIENT_SECRET",
                                               redirect_uri="YOUR_APP_REDIRECT_URI",
                                               scope="user-library-read"))

results = sp.current_user_saved_tracks()
for idx, item in enumerate(results['items']):
    track = item['track']
    print(idx, track['artists'][0]['name'], " – ", track['name'])

Reporting Issues

For common questions please check our FAQ.

You can ask questions about Spotipy on Stack Overflow. Don’t forget to add the Spotipy tag, and any other relevant tags as well, before posting.

If you have suggestions, bugs or other issues specific to this library, file them here. Or just send a pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spotipy-2.22.0.tar.gz (37.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

spotipy-2.22.0-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

spotipy-2.22.0-py2-none-any.whl (28.0 kB view details)

Uploaded Python 2

File details

Details for the file spotipy-2.22.0.tar.gz.

File metadata

  • Download URL: spotipy-2.22.0.tar.gz
  • Upload date:
  • Size: 37.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for spotipy-2.22.0.tar.gz
Algorithm Hash digest
SHA256 b8b9ee9b16ce259e3dbadbc78b40f3760cdc4cc33db7d930252ec790912176d0
MD5 8f566edc0521fc41402f4d61e56413dc
BLAKE2b-256 3a76a7dc4f60c4b90e7fbed331b45148eac5f5c49da1b96614d3303427c2f46f

See more details on using hashes here.

File details

Details for the file spotipy-2.22.0-py3-none-any.whl.

File metadata

  • Download URL: spotipy-2.22.0-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for spotipy-2.22.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d44c6da7f2012f4134d9b70f189ccef0fc924a7dec0a245750b3552abb0cec5
MD5 b454472d3121b05d15f6426f9d286730
BLAKE2b-256 ed5d66cc1ff8eaafc8c0b0ed21fe4089c1d92e2228105563860f3ff456971e18

See more details on using hashes here.

File details

Details for the file spotipy-2.22.0-py2-none-any.whl.

File metadata

  • Download URL: spotipy-2.22.0-py2-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for spotipy-2.22.0-py2-none-any.whl
Algorithm Hash digest
SHA256 fb7b0e86b0bbb458ffd4dc53b4627e5bb95ea52e70887b9d23e0b2ecf11ede5e
MD5 76dbbdaf5c4ced8957247c5b2c70ba7d
BLAKE2b-256 370e3c045392c49788d35d2fdc6943faf546a7dffc5900d8b9347665caf1c762

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page