Unofficial python library for the Qobuz-API (project removed).
Cloned and updated from python-qobuz
- download code from zip, unzip in "ANYWHERE" and run "
pip install "ANYWHERE"/qobuz"
or
- run "
pip install git+https://github.com/fdenivac/python-qobuz"
In order to use the library, your application needs to be authenticated via OAuth.
On first use, or when authentication expires, call something as :
from qobuz.qoauth import QobuzOAuth
from MyConfig import qobuz_config
myconfig = qobuz_config.get_config()
if QobuzOAuth().handle_oauth_login():
myconfig["user_id"] = auth.oauth_user_id
myconfig["auth_token"] = auth.oauth_user_auth_token
myconfig["app_id"] = auth.app_id
myconfig["secrets"] = ",".join(auth.secrets)
myconfig["private_key"] = auth.private_key
qobuz_config.write()... and follow authenticate instructions.
You can now use library as :
import qobuz
from qobuz.qopy import qobuz_api
from MyConfig import qobuz_config
myconfig = qobuz_config.get_config()
qobuz_api.connect_with_token(
myconfig["user_id"],
myconfig["auth_token"],
myconfig["app_id"],
myconfig["secrets"].split(","),
)
albums = qobuz.Album.search("relaxing")
...For a complete usage, see project myqobuz : python script managing playlists and favorites