A Spotify Web API Library for Modern Python
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spotifier-0.1.0.tar.gz
(12.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
spotifier-0.1.0-py3-none-any.whl
(13.1 kB
view details)
File details
Details for the file spotifier-0.1.0.tar.gz.
File metadata
- Download URL: spotifier-0.1.0.tar.gz
- Upload date:
- Size: 12.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.0.0-1035-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3533ff36ac7b6a242948ca70f157bc4ebc2ef989619ba0fd2390f7d77b1aa6e1
|
|
| MD5 |
97812b0ce83c9895fad03c0f804a7a3b
|
|
| BLAKE2b-256 |
c714d06ba1d0e0d43e15aeffe1c9766eddeda02338d39cae1a85acc96a8a3552
|
File details
Details for the file spotifier-0.1.0-py3-none-any.whl.
File metadata
- Download URL: spotifier-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.0.0-1035-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
087626887d386980681d8bae3718c05c59ababa5763a695ee7f19f30c2a8d7f5
|
|
| MD5 |
1c1404c94e5217f5b17b2fff316fa565
|
|
| BLAKE2b-256 |
31bc67a2f140e4371461e2099c7ba0ef905703d0e22c6b02d58fb1b41ff6f2c0
|