Python Virtual Environment (VENV)

Prev Next

Using the Python VENV

The Python Virtual Environment (VENV) is used to execute and test scripts with various versions or dependencies in a specific environment. The scripts contained in the environment are all Python scripts which can be viewed under Scripts in the left navbar of Automation Gateway.

Python VENV Configuration

To configure:

  1. Open Automation Gateway.
  2. Click on Configuration.
  3. Click on Python to verify Python VENV is enabled and check the location path, located in the properties.yml file.

Figure 1: Python Configuration
01_Python_Config_2023_2


Scripts and Virtual Environments

Both Scripts and Virtual Environments are contained within the Python menu. From Automation Gateway, you can choose Python from the left navigation menu. Alternately, you can click the Use Python link in the Get Started card.

Figure 2: Use Python
02_Python_Scripts_2023_2


Virtual Environments

The Virtual Environments menu will display all the virtual environments contained the IAG server directory, which is defined in the properties.yml file.

Clicking on an individual virtual environment in the sidebar menu will display the name, path, and version for that virtual environment.

Figure 3: Virtual Environment
03_Virtual Env_2023_2


Scripts

Clicking on Scripts will show any Python created scripts that have been created or imported into IAG.

Figure 4: Scripts
04_Scripts_2023_2


Select a Virtual Environment from the drop down at the top in order to execute the script that is needed. If an environment is not needed, then the script will run in the main IAG environment.

Figure 5: Selecting a Virtual Environment for a Script
05_VE_Selection_2023_2