Skip to main content

API Quick start

1. Package installation

To install the TrueState Python package, run the following command:

pip install truestate

This will install the TrueState Python package and all its dependencies.

2. Configuring the SDK

To use the SDK, ensure you need:

  1. A valid API key (generate one at the API Key tab of the settings page)
  2. The organisation ID corresponding to that API key (found on the Organisation tab of the settings page)

2.1 Create your API Key

To create your API key, head to the API Keys section of the TrueState platform. Make sure you store your API key in a secure location, as it will not be displayed again after being created.

2.2 Fetch your organisation ID

To fetch your organisation ID, head to the Organisations section of the TrueState platform.

2.3 Store your API key in your environment variables

Once you have an API key, store it in your environment variables:

export TRUESTATE_API_KEY="your-api-key"
export TRUESTATE_ORGANISATION="your-organisation-id"

3. Explore the SDK

Head over to the API Reference section to get started with the SDK. Some example use-cases include: