Teradata Package for Python Function Reference on VantageCloud Lake | 17.20 - remove_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.scriptmgmt.lls_utils.remove_env = remove_env(env_name, **kwargs)
DESCRIPTION:
    Removes the user's Python or R environment from the Open Analytics Framework.
    The remote user environments are created using create_env() function.
    Note:
        remove_env() should not be triggered on any of the environment if
        install_lib/uninstall_lib/update_lib is running on the corresponding
        environment.
 
PARAMETERS:
    env_name:
        Required Argument.
        Specifies the name of the environment to be removed.
        Types: str
 
    **kwargs:
        asynchronous:
            Optional Argument.
            Specifies whether to remove environment synchronously or
            asynchronously. When set to True, environment will be removed
            asynchronously. Otherwise, the environment will be removed synchronously.
            Default Value: False
            Types: bool
 
 
RETURNS:
    True, if the operation is synchronous, str otherwise.
 
RAISES:
    TeradataMlException, RuntimeError.
 
EXAMPLES:
    # Create a Python 3.7.13 environment with given name and description in the Vantage.
    >>> fraud_detection_env = create_env('Fraud_detection',
    ...                                  'python_3.7.13',
    ...                                  'Fraud detection through time matching')
    User environment 'Fraud_detection' created.
    >>>
    # Create a R 4.1.3 environment with given name and description in the Vantage.
    >>> fraud_detection_env = create_env('Carbon_Credits',
    ...                                  'r_4.1',
    ...                                  'Prediction of carbon credits consumption')
    User environment 'Carbon_Credits' created.
    >>>
    # Example 1: Remove Python environment asynchronously.
    >>> remove_env('Fraud_detection', asynchronous=True)
    Request to remove environment initiated successfully. Check the status using list_user_envs(). If environment is not removed, check the status of asynchronous call using async_run_status('ab34cac6-667a-49d7-bac8-d0456f372f6f') or get_env('Fraud_detection').status('ab34cac6-667a-49d7-bac8-d0456f372f6f')
    'ab34cac6-667a-49d7-bac8-d0456f372f6f'
 
    >>>
    # Example 2: Remove R environment synchronously.
    >>> remove_env('Carbon_Credits')
    User environment 'Carbon_Credits' removed.
    True