- 21 Dec 2022
- 3 Minutes to read
- Print
- DarkLight
- PDF
Setup
- Updated on 21 Dec 2022
- 3 Minutes to read
- Print
- DarkLight
- PDF
Install Python
LandingLens CLI supports Python versions 3.6, 3.7, and 3.8. Python is an open-source programming language for building machine learning applications.
It is recommended to install Anaconda Python Distribution. This installation includes the entire scientific Python library, like NumPy, SciPy, and more. Or, if you prefer to go the minimal install route, use Miniconda. If you use this option, say "Yes" or select the checkbox for adding Python to Path.
Verify your Anaconda Python installation by opening a terminal and entering conda. A list of options displays.
If you installed Python through the Anaconda or Miniconda distribution, use conda to create a virtual environment and install from the virtual environment.
# Specify a python version >=3.6 |
If you do not want to install Anaconda or Miniconda, you can create a virtual environment from your terminal (for macOS or Linux) or PowerShell prompt (for Windows):
python3 -m venv ~/envs/llens |
Install LandingLens CLI
You must install LandingLens CLI using wheel.
pip install -U https://landinglens-client-releases.s3.us-east-2.amazonaws.com/landinglens-latest-py3-none-any.whl |
Configure LandingLens CLI
This section explains how to configure LandingLens CLI so that it can interact with the LandingLens servers.
Generate API Key and Secret
The API Key and Secret are only valid within the same organization. If you are working with different organizations, you will need to generate separate credentials for all accounts.
To generate an API Key and Secret:
- Log in to LandingLens.
- Click the User Menu and select API Key.
- Click Generate API Key.
- A pop-up window displays the API Key and Secret credentials. Save these credentials.
- Click OK to close the window.
Quick Configuration
After you generate your API Key and Secret, you must configure llens. For general use cases, llens configure set-profile is the fastest way to set it up.
Run the following command.
llens configure set-profile |
When you enter this command, LandingLens CLI will ask you for the basic settings that are required to interact with LandingLens. This includes your LandingLens API Key and Secret, and Project ID.
Copy and paste them into LandingLens CLI, and you're good to go.
Advanced Configurations
LandingLens CLI configuration is stored in ~/.landinglens/config.ini. It has the following format.
[DEFAULT] [primary] |
Named Profiles
You can create named profiles by specifying --profile as an additional argument.
llens configure set-profile --profile=staging |
This can be useful when working with multiple organizations in Production or running in multiple environments.
[DEFAULT] [primary] [staging] |
Currently, LandingLens CLI does not allow you to choose which profile you want to use when running a job. Therefore, you need to change the default profile before you run a new job. You can achieve this by using the following command:
llens configure set-default <profile name> |
Custom Endpoints
By default, LandingLens CLI calls Landing production servers. To send API calls to staging or other servers, add the following lines to the profile manually.
[staging] # Staging server URLs for all APIs # Print detailed output from request and response to server |
LandingLens CLI Configure Commands
# Get list of commands # Set Configurations # Get list of profiles # Set default profile (when working with local, dev, staging and prod) # Get profile credentials |