Install lightctl
- Install lightctl with the following command:
pip install lightctl==1.0.0
- Download an API credential from your Lightup instance by clicking Settings > API Credentials at the bottom of the left pane. Place the downloaded file,
lightup-api-credentials.json
, somewhere on your file system. - By default lightctl will look for the credentials file in this location:
$HOME/.lightup/credential
. You can create a.lightup
directory under your home directory, copy thelightup-api-credentials.json
credential file there and rename itcredential
. Or, export the path to the file via theLIGHTCTL_CREDENTIAL_PATH
environment variable. If your API credentials file is on your Desktop and you are running on a Mac, you'd use the commandexport LIGHTCTL_CREDENTIAL_PATH=~/Desktop/lightup-api-credential.json
- To test that your installation works, start python in a command shell and run the following code— it should output a python list of the workspaces that you can access in your Lightup instance.
>>> from lightctl.client.workspace_client import WorkspaceClient >>> WorkspaceClient().list_workspaces()
Updated 10 months ago