Skip to content

Installation & Setup

Installation

deci-platform-client currently supports python version >= 3.7

pip install deci-platform-client

Generate Credentials using the Deci Console

To utilize the platform SDK, follow these steps to generate credentials within the platform:

  1. Begin by logging into the platform at https://console.deci.ai. Once logged in, navigate to your account settings. Access this section by either clicking on this link or using the settings option located in the top right bar:

  2. You'll be directed to the "Personal Access Tokens" screen, where you can generate your access token:

  3. Click on the "Generate Token" button. A prompt will appear, asking you to provide a description for your access token. This description will help you identify its purpose later on.

  4. After entering a suitable description, the platform will generate your access token. It's important to take note of the Secret associated with your token, as it won't be shown again.

    Make sure to copy and securely store this information.

  5. Once the credentials have been set aside, click on the "Done" button to proceed.

  6. Lastly, access the Workspace settings to retrieve the workspace ID. Copy and save this ID as it is essential for accessing the desired workspace.

Any amount of keys can be generated in the future should you misplace/delete your credentials.

Logging in

Setting up environment variables

export DECI_CLIENT_ID="<<CLIENT_ID>>"
export DECI_CLIENT_SECRET="<<CLIENT_SECRET>>"
export DECI_WORKSPACE_ID="<<WORKSPACE_ID>>"

Initializing the Client

from deci_platform_client import DeciPlatformClient
client = DeciPlatformClient() 
If everything worked correctly, you should see:
deci_platform_client -INFO- Successfully logged in as jane.doe@deci.ai (Workspace ID - c736ee9e-9fca-4676-b484-371c70c25ebb)