Google Sheets Installation¶
Google Sheets can be used as a database to store your parameter sets. The advantage to using this “database” over a file containing the parameters is that a team can work on the set more collaboratively and update the parameter list on the fly. The bigger advantage is that the parameter list can be run dynamically. Meaning that people, running the library simultaneously, can connect to Google Sheets and get the next parameter set in the list.
Get API Credentials¶
To use Google Sheets you will need to use the Google Sheets API and generate the proper credentials.
- Start by going to the Google Developer Console and login using a Google account.
- Create a new project by selecting the button labeled “CREATE PROJECT”. If you have already created a project or do not see the button, selecting the down arrow next in the top left corner of the page next to the “Google API” logo and clicking “New Project”.
- Give the project a name and press “CREATE”.
- Click “ENABLE APIS AND SERVICES”, search for “Google Sheets API” and click it. Then click “Enable”.
- Click the “Credentials” tab from the menu on the left side of the page. Click the dropdown at the top of the page that says “CREATE CREDENTIALS” and select “Service account”.
- Give the service a name and click “Create”.
- In the next section asking about service account permissions, create a role with by selecting “Project” then “Editor”. Then select “Continue”.
- On step three of creating the credentials, click “DONE”.
- You should now be on the credentials page of the Google Sheets API. Under Service Account you should see an entry with the name of the account you just created. Record the email address given there. You will need to share the Google Sheet acting as a database with it. The email address should end in
- To get the credentials needed by DAPT click on the pen on the right side of the Service Account.
- Under the “Keys” section, select “ADD KEY”, then “Create new key”. Ensure the key type of “JSON” is selected and click “CREATE”. A JSON file should then start downloading to your computer. You will give DAPT the path to this JSON file when using Google Sheets. Then click “DONE”.