Use the SDK with a DataStories Platform license

The purpose of this note is to explain how to use the SDK with a compatible DataStories Platform license.

Generate API token

After we verified that we have the rights to use the SDK with our current license, we must set an API token in the platform.

We navigate to DataStories Platform and go to Settings. Then we select the tab API KEYS AND SESSIONS and click on the GENERATE KEY button in the first section. We recommend to add a label and we’re all set.

Setup the connection

We need to set our API token as the environment variable DS_LICENSE_API_KEY. Then we need to import the License Manager to initialize the connection. We recommend to print the manager to check it was successful.

# Python example

import os

os.environ[“DS_LICENSE_API_KEY”] = “api-token-here”

from datastories.license import manager

print(manager)