Teradata Package for Python Function Reference on VantageCloud Lake | 17.20 - get_env - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.

Teradata® Package for Python Function Reference on VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Package for Python
Release Number
17.20
Publication Date
November 2022
Content Type
Programming Reference
Publication ID
B700-4500-112K
ft:locale
en-US
ft:lastEdition
2024-02-21
ft:sourceId
FTML
dita:id
TeradataPython_FxRef_Lake_1720
Product Category
Teradata Vantage
teradataml.lls_utils.get_env = get_env(env_name)
DESCRIPTION:
    Returns an object of class UserEnv which represents an existing remote user environment
    created in the Open Analytics Framework. The user environment can be created using
    create_env() function. This function is useful to get an object of existing user
    environment. The object returned can be used to perform further operations such as
    installing, removing files and libraries.
 
PARAMETERS:
    env_name:
        Required Argument.
        Specifies the name of the existing remote user environment.
        Types: str
 
RETURNS:
    An object of class UserEnv representing the remote user environment.
 
RAISES:
    TeradataMlException.
 
EXAMPLES:
    # List available Python environments in the Vantage.
    >>> list_base_envs()
    >>> list_base_envs()
       base_name      language  version
    0  python_3.6.11  Python   3.6.11
    1  python_3.7.9   Python   3.7.9
    2  python_3.8.5   Python   3.8.5
 
    # Create a Python 3.8.5 environment with given name and description in the Vantage and
    # get an object of class UserEnv.
    #
    >>> test_env = create_env('test_env', 'python_3.8.5', 'Fraud detection through time matching')
    User environment 'test_env' created.
 
    # In a new terdataml session, user can use get_env() function to get an object pointing to
    # existing user environment created in previous step so that further operations can be
    # performed such as install files/libraries.
    >>> test_env = get_env('test_env')