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.15.0.tar.gz (28.1 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.15.0-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

spotipy-2.15.0-py2-none-any.whl (24.6 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: spotipy-2.15.0.tar.gz
  • Upload date:
  • Size: 28.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for spotipy-2.15.0.tar.gz
Algorithm Hash digest
SHA256 f972e4a92cbe06584ab092b1198d082ee666264819a07b6742abbca6fb4722b6
MD5 1dfe4aba252de85441dc2aa1b18814ec
BLAKE2b-256 a203b9267789b5f7d2e4127efb0985dda31a391434e7edd4902b3a09520c6641

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spotipy-2.15.0-py3-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for spotipy-2.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ccbf3f99e2ecefa67b4a6b19b1e8f66c3562bd22a4a1ed350b674de8b1b3c4b
MD5 3cbbd4524d2feca3e7e8c045af13a295
BLAKE2b-256 654b67aa672cd892a54997c9d1368bdc05b9550841b119329eb6966b4e933053

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spotipy-2.15.0-py2-none-any.whl
  • Upload date:
  • Size: 24.6 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for spotipy-2.15.0-py2-none-any.whl
Algorithm Hash digest
SHA256 713082ec298b478722e4bb8b42d1c1a6a9dcb46a21e12b7e5fe1d3c5013dae9e
MD5 f6931f4753490fe519225fbc80e8ad70
BLAKE2b-256 b2fbfb10d5c08de12e4326d746b198ff3ca98240a1dd4a649c8304f158d283ce

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