Skip to content
The KKBOX Open API SDK for Python.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

KKBOX OpenAPI SDK for Python

License Apache 2.0 pypi pypi

The SDK helps accessing various metadata such as KKBOX tracks, albums, artists, playlists and stations.


Source installation

[sudo] python install

Pypi installation

pip install kkbox-developer-sdk

The package works with both Python 2 and Python 3.

Running Tests

Test cases are placed in the test folder. To run the tests, first, please visit to obtain a valid client ID and client secret.

Second, create in the test directory which contains a class named ClientInfo, and put your client id and client secret in it. It will looks like:

class ClientInfo():
    client_id = "YOUR_CLIENT_ID"
    client_secret = "YOUR_CLIENT_SECRET"

Then we can run the tests.


To access all of the KKBOX's APIs, we have to obtain an access token at first.

from kkbox_developer_sdk.auth_flow import KKBOXOAuth
token = auth.fetch_access_token_by_client_credentials()

Once the access token is obtained, we may call APIs like this:

from kkbox_developer_sdk.api import KKBOXAPI
kkboxapi = KKBOXAPI(token)
artist_id = '8q3_xzjl89Yakn_7GB'
artist = kkboxapi.artist_fetcher.fetch_artist(artist_id)


Documentation of the SDK is available at .

To get started, visit Beginner's Guide for Python Developers.

Documentation Generation

We use Sphinx, recommonmark and sphinx-rtd-theme to build the documentation of the SDK. Thus, you need to install these tools by the following command.

pip install Sphinx recommonmark sphinx-rtd-theme

Then you can generate documentation using sphinx:

sphinx-apidoc -o doc -f kkbox_developer_sdk
cd doc
make html

API Documentation

KKBOX's Open API documentation is available at


Copyright 2017 KKBOX Technologies Limited

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

You can’t perform that action at this time.