Initializing help system before first use

AppInterface.username

AppInterface.username


Purpose
Property for the username of the Insight user that initiated the current scenario execution.
Synopsis
username: str
Return value
The user name.
Example
Demonstration of setting the user name (test mode only).
>>> insight.username = 'LouisXIV'		
Demonstration of getting the user name then outputting it.
>>> print('user name = ', insight.username)
user name = LouisXIV		
Further information
1. The username property can only be set in test mode.
2. When called while the model is not running within Insight, this returns DEV.
3. The username returned will be the username suitable for human display - be aware that this is not a unique identifier for the user's account, as users can change their names.
4. Used to mock the user who requested the scenario execution, when testing code outside of an Insight scenario.
5. Modifying this property when insight.test_mode is False will cause the model to abort with a runtime error.