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.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: ayx_python_sdk.providers.amp_provider.amp_provider_v2.AMPProviderV2, arrow_date: pyarrow.lib.Date32Scalar) datetime.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 = './') pathlib.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() ayx_python_sdk.providers.amp_provider.utilities.constants.ToolEnvType[source]

Determine the Tool Environment Type based on TOOL_SERVICE_ADDRESS env var.

Module contents

Resources to be consumed by the amp provider.