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.16.0.tar.gz (29.3 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.16.0-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

spotipy-2.16.0-py2-none-any.whl (24.7 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: spotipy-2.16.0.tar.gz
  • Upload date:
  • Size: 29.3 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.16.0.tar.gz
Algorithm Hash digest
SHA256 315eadd1248053ed336b4d3adbf2e3c32895fdbb0cfcd170542c848c8fd45649
MD5 93f9f41149129f569abf82e009533acd
BLAKE2b-256 c6988e4b724c6bbeda5b392350f2dfc9703de01e5e0c6aa950502234dbde4793

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spotipy-2.16.0-py3-none-any.whl
  • Upload date:
  • Size: 24.7 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.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9d07b8948c30d8a338805440797263749ccad07c22009f9b3112aa2bcb2ebcea
MD5 87f8ed011616f37e85a821e5d5a2e215
BLAKE2b-256 9f219dcb15600495e8474befd275510e4d7aadfa796554d2f414b57f73731323

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spotipy-2.16.0-py2-none-any.whl
  • Upload date:
  • Size: 24.7 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.16.0-py2-none-any.whl
Algorithm Hash digest
SHA256 800330badc1b953417dace1532a586220d35b2240eb2e538e883e19e6bf1b53d
MD5 d60ebe5dc3b6fae4e1ad630651fe8220
BLAKE2b-256 af4de86af3a7f8dcce59c37df3b068fb057319b91b41982702fae3f9e95f7cee

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