create_context() can establish connection to Vantage with the environment variables.
- Environment variables should always start with prefix "TD_". For example, to read "host" from environment variable, set the environment variable to "TD_HOST".
- You can specify any argument with the format specified in Create connection using config file and create_context() considers all these variables for establishing connection to Vantage.
Example
Set the following variables using os.environ, then run the example:
- os.environ['TD_HOST'] = 'tdhost'
- os.environ['TD_USERNAME'] = 'tduser'
- os.environ['TD_PASSWORD'] = 'tdpassword'
>>> td_context = create_context()