ayx_plugin_sdk.providers.amp_provider package

Submodules

ayx_plugin_sdk.providers.amp_provider.amp_environment module

ayx_plugin_sdk.providers.amp_provider.amp_input_anchor module

Plugin input anchor definition, AMP.

class ayx_plugin_sdk.providers.amp_provider.amp_input_anchor.AMPInputAnchor(name: str, allow_multiple: bool = False, optional: bool = False, connections: Optional[List[InputConnectionBase]] = None)[source]

Bases: ayx_plugin_sdk.core.input_anchor_base.InputAnchorBase

Tool’s input anchor.

property allow_multiple

Get the status of if multiple connections are allowed.

Returns

Boolean indicating if multiple connections are allowed.

Return type

bool

property connections

Get the anchor connections.

Returns

List of all the connections associated with this anchor.

Return type

List[InputConnectionBase]

property name

Get the name of the input anchor.

Returns

The name of the input anchor.

Return type

str

property optional

Get the status of if the input anchor is optional.

Returns

Boolean indicating if input anchor is optional.

Return type

bool

ayx_plugin_sdk.providers.amp_provider.amp_input_connection module

AMP SDK Input Connection Class.

class ayx_plugin_sdk.providers.amp_provider.amp_input_connection.AMPInputConnection(name: str, metadata: Metadata, anchor: AMPInputAnchor)[source]

Bases: ayx_plugin_sdk.core.input_connection_base.InputConnectionBase

Class for managing Inputs in AMP SDK provider.

property anchor

Get the input anchor this connection is associated with.

Returns

The anchor this input connection is associated with.

Return type

InputAnchorBase

property max_packet_size

Get the maximum number of records per packet.

Returns

The maximum number of records in a packet.

Return type

int, optional

property metadata

Get the connection metadata.

Returns

The metadata associated with this input connection.

This will return None when accessed before the input connection has been opened, since the metadata isn’t known until that point.

Return type

Metadata, optional

property name

Get the connection name.

Returns

Name of the input connection.

Return type

str

property progress

Get the progress percentage of records received on this input connection.

Returns

The progress percentage of the connection.

Return type

float

read() → RecordPacketBase[source]

Read a record packet from the incoming connection.

Returns

A record packet containing the data received by this connection.

Return type

RecordPacketBase

ayx_plugin_sdk.providers.amp_provider.amp_io module

Proxy Class for SDK IO, AMP.

class ayx_plugin_sdk.providers.amp_provider.amp_io.AMPIO[source]

Bases: ayx_plugin_sdk.core.io_base.IoBase

Class that wraps all IO with Designer.

create_temp_file(extension: str = 'tmp', options: int = 0)pathlib.Path[source]

Create a temporary file managed by Designer.

Parameters
  • extension – The extension of the new

  • options

    Lifecycle management options for the temp file.

    0: A normal temp file. It is cleaned up by Designer when a Run completes.

    1: A temp file for a GUI element, such as a browse, that the GUI is responsible for cleaning up.

    2: A temp file for a GUI element, such as a browse, that the GUI is responsible for cleaning up. Additionally, the file name is not made to be unique. Use when the extension argument already contains a unique ID.

Returns

Path to the new temp file.

Return type

Path

error(error_msg: str)None[source]

Display an error in the results window.

Parameters

error_msg – A string to show as an error in the Alteryx results panel.

info(info_msg: str)None[source]

Display an info message in the results window.

Parameters

info_msg – A string to show as an info message in the Alteryx results panel.

translate_msg(msg: str, *args: Any)str[source]

Translate a message to the current locale.

Deprecated since version 0.1.0a: translate_msg is not the recommended translation mechanism. See the documentation on localization.

Parameters
  • msg – A string to translate.

  • args – Arguments for string interpolation.

update_progress(percent: float)None[source]

Update tool progress.

Parameters

percent – A number between 0 and 100 to indicate the progress percent.

warn(warn_msg: str)None[source]

Display a warning in the results window.

Parameters

warn_msg – A string to show as a warning in the Alteryx results panel.

ayx_plugin_sdk.providers.amp_provider.amp_output_anchor module

ayx_plugin_sdk.providers.amp_provider.amp_provider module

ayx_plugin_sdk.providers.amp_provider.amp_record_packet module

ayx_plugin_sdk.providers.amp_provider.grpc_util module

Module contents