You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

spotifier

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spotifier

A Spotify Web API Library for Modern Python

0.1.0
pipPyPI
Maintainers
1

Spotifier

:notes: A Spotify Web API Library for Modern Python

Notice

I do not recommend using this package as it is not yet ready for use.

Feature

  • All functions supports type hint (Up to the level of TypedDict!)
  • Reproduce API documentation with code as much as possible (You can handle errors w/o wasting requests!)

Install

pip install git+https://github.com/skmatz/spotifier.git

Quick Start

import os
import webbrowser  # to open URL in browser

from spotifier import Spotify
from spotifier.oauth import SpotifyAuthorizationCode


oauth = SpotifyAuthorizationCode(
    client_id=os.environ["SPOTIFY_CLIENT_ID"],
    client_secret=os.environ["SPOTIFY_CLIENT_SECRET"],
    redirect_uri=os.environ["SPOTIFY_REDIRECT_URI"],
)

webbrowser.open(oauth.get_authorize_url())
url = input("Input redirected URL: ")

code = oauth.parse_response_code(url)
oauth.set_token(code)

client = Spotify(oauth)

print(client.get_current_users_profile()["display_name"])  # your Spotify nickname

Supported API

  • Authorization Code Flow
  • Client Credentials Flow

Keywords

Spotify

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts