Installing LabGuruAPI

Configuring AWS

Making a profile

You will need an AWS profile to be able to install the LabGuruAPI package from our CodeArtifact repository. If you do not have one already, ask Mark or Rob to create one for you. We will provide you with a credentials.csv file once your profile is active.

Installing the AWS Command Line Interface (CLI)

System Requirements:
  • 64-bit Windows (all GRO computers should be 64-bit)

  • Admin rights to install software (all GRO users should be able to install software on their computers)

Process:
  1. Download and run the CLI Installer from Amazon.

  2. To confirm the installation, open the Start menu, search for cmd to open a command prompt window, and at the command prompt use the aws --version command. Your output should look like:

    C:\> aws --version
    aws-cli/2.11.14 Python/3.11.3 Windows/10 exe/AMD64 prompt/off
    

If you encounter problems, please reference the AWS Troubleshooting Document

Importing your credentials

Open a command prompt window and use the aws configure import command with the --csv option to import the credentials.csv file provided by a system admin

Run the following command, replacing file://credentials.csv with the path to your credentials.csv file.

C:\> aws configure import --csv file://credentials.csv

Getting the package from CodeArtifact

Once you have configured your AWS CLI, you can install the LabGuruAPI package almost as easily as everything else. The only difference is that you will need to log in to CodeArtifact and add the code artifact repository to pip. Luckily, this can be done in a single command via the AWS CLI. You will remain logged in for 12 hours. The shell command is the same for each operating system.

aws codeartifact login --tool pip --repository foundry-pypi --domain grobio-foundry --domain-owner 409124030547 --region us-east-2

You can then install foundrybackend package, which includes the LabGuruAPI module.

pip install foundrybackend

Note

Running this command will change the default python repository from pypi to CodeArtifact for your entire system. To switch back, run the command

pip config unset global.index-url