spotifylib package¶
Submodules¶
spotifylib.spotifylib module¶
This module makes use of Spotipy’s methods but modifying the authentication in a simple and transparent way from the user without any need of 3rd party application to follow the OAuth flow as mentioned in the following documentation page.
https://developer.spotify.com/web-api/authorization-guide/#authorization_code_flow
-
class
spotifylib.spotifylib.
Spotify
[source]¶ Bases:
object
Library’s interface object
Instantiates the authentication object to figure out the token and passes it alongside the session to Spotipy’s in order to use its methods.
-
class
spotifylib.spotifylib.
SpotifyAuthenticator
(client_id, client_secret, username, password, callback, scope)[source]¶ Bases:
object
Authenticator object
This object handles authentication for all requests. In order to retrieve all values for this to work, one has to create a new application under his/her account.
https://developer.spotify.com/my-applications/#!/applications
-
token
¶
-
spotifylib.spotifylibexceptions module¶
Main module Exceptions file
Put your exception classes here
-
exception
spotifylib.spotifylibexceptions.
SpotifyError
[source]¶ Bases:
exceptions.Exception
# Wrong client_id (<Response [400]>, ‘INVALID_CLIENT: Invalid client’)
# Wrong response_type (<Response [400]>, ‘response_type must be code or token’)
# Invalid scope (<Response [400]>, ‘INVALID_SCOPE: Invalid scope’)
# Invalid CSRF cookie (<Response [400]>, ‘{“error”:”errorCSRF”}’)
# Invalid redirect_uri (<Response [400]>, ‘Illegal redirect_uri’) “Error while accepting APP to Spotify API”