Overview
Variables is designed to simplify working with environments consisting of variables. Variables can be added from the Variables window or added/edited/removed from Python plugin code, allowing interaction with the same variables from different plugins or projects.
Working with Variables:
- Create enviroment and variables from Variable window.
- Create enviroment and variables from Python plugin.
Create enviroment and variables from Variable window
- Open Variables.
- Fill enviroments name.
Press “Add” button.
Adding new variables filling the following fields :
Key
Value
- Press “Add” button.
- Press “Save” button.
- The variables window displays the created environments and the number of variables in them. To edit variables, click on the environment name and the variable editing window will open.
Create enviroment and variables from Python plugins.
To work with the environment and variables, you can use the following commands:
- ev = kwargs['ev'] - enable work with environment variables
- env = ev.set('environment_name') - create or upadate, returns environment (created or existing)
- ev.remove('environment_name') - remove environment
- env = ev.get('environment_name') - get enviroment (returns None if not found)
- variable_value = env.get('variable_name') - get variable value
- env.set('variable_name', 'variable_value') - create or upadate variable
- env.remove(variable_name: str) - remove variable