Getting started with the Cloud SDK

The Cloud SDK is a lightweight Python module which can interact with various Formant cloud capabilities such as querying for devices and telemetry data, ingesting data without an agent, and issuing commands. It allows you to use the Formant platform programmatically, without having to use the web application or UI.

Setting up the Cloud SDK

Step 1: Installation

You can use pip to install the Cloud SDK by entering the appropriate command in your terminal:

pip install formant

or,

pip3 install formant

Step 2: Create a service account

Service accounts are used to grant access only to the Formant SDKs or API. You'll need to use a service account to authenticate data transfer to and from the Cloud SDK. You can do this either through the Formant web application, or using fctl.

Using the Formant web application

For more information on service accounts, including step-by-step instructions to create and authenticate a service account using the Formant web application, see Users, service accounts, and teams. After you've finished creating a service account, return to this page and continue to Step 3.

Using fctl

fctl is Formant's administrative command line tool, which you can use to create and authenticate a service account.

  1. Install fctl using the following instructions: Installing and credentialing fctl.
  2. Once you have installed and authenticated fctl with your administrator email and password, create a service account. To see a description and example syntax, run the following command:
fctl create service-account -h

After successfully running this command, fctl will output the required credentials for your service account, including service account email and password.

  1. Save your service account credentials.

๐Ÿšง

Copy and paste these credentials to a secure location. This is the only time you will be able to copy this password, and you will need it to authenticate data transfer to Formant.

Step 3: Configure environment variables

Finally, we'll use the credentials from the service account created in Step 2 to authenticate data transactions with Formant. This is accomplished by loading the service account credentials into your device's environment variables.

You'll need to create two environment variables: FORMANT_EMAIL and FORMANT_PASSWORD. Copy and paste the credentials from Step 2 as the values for these variables.

๐Ÿ“˜

Steps to set environment variables depend on your shell and operating system. To learn how to configure environment variables on your machine, refer to a trusted documentation source for your system.

Calls to the Formant agent will check these credentials before authorizing data transactions.

You're now ready to program with the Formant Cloud SDK!