- 14 Aug 2023
-
DarkLight
-
PDF
Python Virtual Environment (VENV)
- Updated on 14 Aug 2023
-
DarkLight
-
PDF
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:
- Open Automation Gateway.
- Click on Configuration.
- Click on Python to verify Python VENV is enabled and check the location path, located in the
properties.yml
file.
Figure 1: Python Configuration
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
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
Scripts
Clicking on Scripts will show any Python created scripts that have been created or imported into IAG.
Figure 4: Scripts
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