ayx_python_sdk.providers.amp_provider.utilities package

Submodules

ayx_python_sdk.providers.amp_provider.utilities.constants module

Workspace constant definitions.

class ayx_python_sdk.providers.amp_provider.utilities.constants.ToolEnvType(value)[source]

Bases: str, Enum

YXI installation types.

Desktop = 'Desktop'
Service = 'Service'

ayx_python_sdk.providers.amp_provider.utilities.conversions module

Conversion methods for AMP Provider classes.

ayx_python_sdk.providers.amp_provider.utilities.conversions.arrow_scalar_date32_to_py(provider: AMPProviderV2, arrow_date: Date32Scalar) date[source]

Convert a Arrow Date32Scalar to a Python datetime object.

Parameters:
  • provider – AMPProviderV2 context, necessary for Designer version

  • arrow_date – An Arrow date represented as days since Epoch.

Returns:

The converted date value.

Return type:

date

Deprecated since version 2.1.1: This function is no more necessary since version 2022.2 of Designer

ayx_python_sdk.providers.amp_provider.utilities.utilities module

Utility methods for AMP Provider classes.

ayx_python_sdk.providers.amp_provider.utilities.utilities.get_temp_file(extension: str = 'tmp', temp_dir: str = './') Path[source]

Create a temporary file managed by Designer.

Parameters:
  • extension – The file extension of the temp file.

  • temp_dir – Directory in which to place the temp file.

Returns:

The path to where the temp file is.

Return type:

Path

ayx_python_sdk.providers.amp_provider.utilities.utilities.tool_type() ToolEnvType[source]

Determine the Tool Environment Type based on TOOL_SERVICE_ADDRESS env var.

Module contents

Resources to be consumed by the amp provider.