ayx_plugin_sdk.providers.e1_provider package

Subpackages

Submodules

ayx_plugin_sdk.providers.e1_provider.anchor_builder module

Alteryx tool configuration definition.

class ayx_plugin_sdk.providers.e1_provider.anchor_builder.AnchorBuilder(tool_config: Dict[str, Any], output_anchor_mgr: AlteryxPythonSDK.OutputAnchorManager)[source]

Bases: object

Anchor builder definition.

build_input_anchors() → List[ayx_plugin_sdk.providers.e1_provider.e1_input_anchor_proxy.E1InputAnchorProxy][source]

Build the input anchors based on tool config settings.

build_output_anchors() → List[ayx_plugin_sdk.providers.e1_provider.e1_output_anchor_proxy.E1OutputAnchorProxy][source]

Build the output anchors based on tool config settings.

output_anchor_mgr
tool_config

ayx_plugin_sdk.providers.e1_provider.cache_e1_sdk_import module

Get the E1 package.

ayx_plugin_sdk.providers.e1_provider.cache_e1_sdk_import.cache_e1_sdk_import()None[source]

Cache the import for the E1 SDK.

This is necessary in order to remove the dependency on the AlteryxPythonSDK package.

ayx_plugin_sdk.providers.e1_provider.connection_callback_strategy module

Connection callback strategy definitions.

class ayx_plugin_sdk.providers.e1_provider.connection_callback_strategy.ConnectionCallbackStrategy(plugin_proxy: E1PluginProxy)[source]

Bases: abc.ABC

ABC for callback strategy.

abstract connection_closed_callback(**_: Any)None[source]

Run callback for connection closing.

connection_initialized_callback(connection: ayx_plugin_sdk.providers.e1_provider.connection_interface.ConnectionInterface, **_: Any)None[source]

Run callback for connection initialization.

plugin_proxy
abstract record_received_callback(connection: ayx_plugin_sdk.providers.e1_provider.connection_interface.ConnectionInterface, **_: Any)None[source]

Run callback for when a record is received.

update_progress_callback(**_: Any)None[source]

Update input progress percentage.

class ayx_plugin_sdk.providers.e1_provider.connection_callback_strategy.UpdateOnlyConnectionCallbackStrategy(plugin_proxy: E1PluginProxy)[source]

Bases: ayx_plugin_sdk.providers.e1_provider.connection_callback_strategy.ConnectionCallbackStrategy

Callback strategy for update only runs.

connection_closed_callback(**_: Any)None[source]

Close all anchors.

plugin_proxy
record_received_callback(connection: ayx_plugin_sdk.providers.e1_provider.connection_interface.ConnectionInterface, **_: Any)None[source]

Raise error since this should never be called in update only mode.

class ayx_plugin_sdk.providers.e1_provider.connection_callback_strategy.WorkflowRunConnectionCallbackStrategy(plugin_proxy: E1PluginProxy)[source]

Bases: ayx_plugin_sdk.providers.e1_provider.connection_callback_strategy.ConnectionCallbackStrategy

Callback strategy for workflow runs.

connection_closed_callback(**_: Any)None[source]

Process any remaining records and finalize.

plugin_proxy
record_received_callback(connection: ayx_plugin_sdk.providers.e1_provider.connection_interface.ConnectionInterface, **_: Any)None[source]

Process single records by batch size.

ayx_plugin_sdk.providers.e1_provider.connection_interface module

Connection class definitions.

class ayx_plugin_sdk.providers.e1_provider.connection_interface.ConnectionInterface(plugin_proxy: E1PluginProxy, connection_name: str, anchor: E1InputAnchorProxy)[source]

Bases: ayx_plugin_sdk.core.observable_mixin.ObservableMixin

Connection interface definition.

add_record_container(container: ayx_plugin_sdk.providers.e1_provider.records.base_record_container.BaseRecordContainer)None[source]

Add a new record container.

anchor
clear_records()None[source]

Clear all records for this connections containers.

ii_close()None[source]

Close the connection.

ii_init(record_info: AlteryxPythonSDK.RecordInfo)bool[source]

Initialize the connection.

ii_push_record(record: AlteryxPythonSDK.RecordRef)bool[source]

Receive a record.

ii_update_progress(d_percent: float)None[source]

Update progress of incoming data.

name
plugin_failed
plugin_failure_callback(**_: Any)None[source]

Set failed status from plugin.

plugin_proxy
progress_percentage
record_batch_size
record_containers
property record_info

Getter for record info.

status
class ayx_plugin_sdk.providers.e1_provider.connection_interface.ConnectionStatus

Bases: enum.IntEnum

An enumeration.

CLOSED = 4
CREATED = 1
INITIALIZED = 2
RECEIVING_RECORDS = 3

ayx_plugin_sdk.providers.e1_provider.e1_environment module

Proxy Class for managing SDK Environment.

class ayx_plugin_sdk.providers.e1_provider.e1_environment.E1Environment(engine: AlteryxPythonSDK.AlteryxEngine, tool_id: int, plugin_proxy: E1PluginProxy)[source]

Bases: ayx_plugin_sdk.core.environment_base.EnvironmentBase

Environment variables for designer.

property alteryx_install_dir

Get the alteryx install directory.

property alteryx_locale

Retrieve locale code from alteryx user settings.

property designer_version

Return the version of designer that is being used.

Returns

A version in the format of 1.2.3.4

Return type

str

property update_mode

Get the type of update running.

property update_only

Check if the engine is running in update only mode.

Returns

True if running in update only.

Return type

bool

update_tool_config(new_config: dict)None[source]

Update the tool’s configuration.

Parameters

new_config – The new configuration to set for the tool.

Returns

Return type

None

property workflow_dir

Get the directory for the currently running workflow.

ayx_plugin_sdk.providers.e1_provider.e1_input_anchor module

Alteryx plugin input anchor definition.

class ayx_plugin_sdk.providers.e1_provider.e1_input_anchor.E1InputAnchor(input_anchor_proxy: ayx_plugin_sdk.providers.e1_provider.e1_input_anchor_proxy.E1InputAnchorProxy)[source]

Bases: ayx_plugin_sdk.core.input_anchor_base.InputAnchorBase

Input anchor to the tool.

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.e1_provider.e1_input_anchor_proxy module

Alteryx plugin input anchor definition.

class ayx_plugin_sdk.providers.e1_provider.e1_input_anchor_proxy.E1InputAnchorProxy(name: str, allow_multiple: bool, optional: bool)[source]

Bases: object

Input anchor to the tool.

allow_multiple
connections
name
optional

ayx_plugin_sdk.providers.e1_provider.e1_input_connection module

E1 SDK Input Connection class.

class ayx_plugin_sdk.providers.e1_provider.e1_input_connection.E1InputConnection(conn_interface: ayx_plugin_sdk.providers.e1_provider.connection_interface.ConnectionInterface)[source]

Bases: ayx_plugin_sdk.core.input_connection_base.InputConnectionBase

Class for managing Inputs in E1 SDK.

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

read() → RecordPacket[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.e1_provider.e1_io module

Proxy Class for SDK IO.

class ayx_plugin_sdk.providers.e1_provider.e1_io.E1IO(engine: AlteryxPythonSDK.AlteryxEngine, tool_id: int)[source]

Bases: ayx_plugin_sdk.core.io_base.IoBase

Class wrapping all IO communication with Alteryx 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.e1_provider.e1_output_anchor module

Alteryx plugin output anchor definition.

class ayx_plugin_sdk.providers.e1_provider.e1_output_anchor.E1OutputAnchor(output_anchor_proxy: ayx_plugin_sdk.providers.e1_provider.e1_output_anchor_proxy.E1OutputAnchorProxy, engine: AlteryxPythonSDK.AlteryxEngine)[source]

Bases: ayx_plugin_sdk.core.output_anchor_base.OutputAnchorBase

Output anchor definition.

property allow_multiple

Get the status of if multiple connections are allowed.

Returns

Boolean indicating if multiple connections are allowed.

Return type

bool

close()None[source]

Close the outgoing connection.

flush()None[source]

Flush the written records for this output connection.

property is_open

Get if the anchor is open.

property metadata

Get the anchor metadata.

property name

Get the name of the output anchor.

Returns

The name of the output anchor.

Return type

str

property num_connections

Get the number of connections attached to the anchor.

Returns

The number of downstream connections on this anchor.

Return type

int

open(metadata: ayx_plugin_sdk.core.metadata.Metadata)None[source]

Open the output anchor.

Write the outgoing record metadata and open this connection for outgoing packets.

Parameters

metadata – The metadata to set for this anchor.

property optional

Get the status of if the input anchor is optional.

Returns

Boolean indicating if input anchor is optional.

Return type

bool

update_progress(percent: float)None[source]

Update the progress on downstream connections.

Parameters

percentage – The percentage to write to Designer, indicating the progress of output on this anchor.

write(record_packet: RecordPacketBase)None[source]

Write a RecordPacket to the outgoing connection.

Parameters

record_packet – The record packet to write to the output anchor.

class ayx_plugin_sdk.providers.e1_provider.e1_output_anchor.OutputAnchorStatus[source]

Bases: enum.Enum

Output anchor status enumeration.

CLOSED = 2
CREATED = 0
OPEN = 1
ayx_plugin_sdk.providers.e1_provider.e1_output_anchor.generate_records_from_df(df: pd.DataFrame, record_info: AlteryxPythonSDK.RecordInfo) → Iterator[AlteryxPythonSDK.RecordCreator][source]

Generate record creators from a dataframe.

ayx_plugin_sdk.providers.e1_provider.e1_output_anchor_proxy module

Alteryx plugin output anchor definition.

class ayx_plugin_sdk.providers.e1_provider.e1_output_anchor_proxy.E1OutputAnchorProxy(name: str, allow_multiple: bool, optional: bool, output_anchor_mgr: AlteryxPythonSDK.OutputAnchorManager, record_info: Optional[AlteryxPythonSDK.RecordInfo] = None)[source]

Bases: object

Output anchor definition.

allow_multiple
close()None[source]

Close the output anchor.

engine_anchor_ref
name
num_connections
optional
push_metadata()None[source]

Push metadata to downstream tools.

push_records
property record_info

Getter for record info.

update_progress(percent: float)None[source]

Push the progress to downstream tools.

ayx_plugin_sdk.providers.e1_provider.e1_plugin_driver module

E1 SDK Driver Class.

class ayx_plugin_sdk.providers.e1_provider.e1_plugin_driver.E1PluginDriver(user_plugin_class: Type[Plugin], provider: ProviderBase)[source]

Bases: object

Wrapper around the plugin to expose only interfaces defined for a provider.

initialize_connection(connection: ConnectionInterface)None[source]

Initialize a connection.

initialize_plugin()None[source]

Initialize plugin.

on_complete()None[source]

Close plugin code after all records have finished streaming.

on_record_packet(connection: ConnectionInterface)None[source]

Handle the record packet received through the input connection.

ayx_plugin_sdk.providers.e1_provider.e1_plugin_proxy module

Base plugin definition.

class ayx_plugin_sdk.providers.e1_provider.e1_plugin_proxy.E1PluginProxy(tool_id: int, alteryx_engine: AlteryxPythonSDK.AlteryxEngine, output_anchor_mgr: AlteryxPythonSDK.OutputAnchorManager)[source]

Bases: ayx_plugin_sdk.core.observable_mixin.ObservableMixin

Base plugin to inherit from.

property all_connections_closed

Getter for if all input connections are closed.

property all_connections_initialized

Getter for if all input connections are initialized.

property all_required_connections_connected

Getter for if all required connections are connected.

anchor_builder
property callback_strategy

Generate the callback strategy for the tool.

close_output_anchors()None[source]

Close connection for all output anchors.

configure_logger()None[source]

Configure the logger.

engine
property environment

Get the Environment object from this provider.

failure_occurred
get_input_anchor(input_anchor_name: str)ayx_plugin_sdk.providers.e1_provider.e1_input_anchor_proxy.E1InputAnchorProxy[source]

Get an input anchor by name.

get_output_anchor(output_anchor_name: str)ayx_plugin_sdk.providers.e1_provider.e1_output_anchor_proxy.E1OutputAnchorProxy[source]

Get an output anchor by name.

handle_plugin_error(e: Exception)None[source]

Log a plugin error to the log and a generic error to Designer.

initialized
input_anchors
property io

Get the IO object from this provider.

property log_directory

Get the log directory.

property log_filepath

Get the log filename.

property logger

Get logger.

output_anchors
pi_add_incoming_connection(anchor_name: str, connection_name: str)ayx_plugin_sdk.providers.e1_provider.connection_interface.ConnectionInterface[source]

Add incoming connection to the tool from the engine.

pi_add_outgoing_connection(anchor_name: str)bool[source]

Register an outgoing connection from this tool.

pi_close(b_has_errors: bool)None[source]

pi_close is useless. Never use it.

pi_init(workflow_config_xml_string: str)None[source]

Plugin initialization from the engine.

pi_push_all_records(n_record_limit: int)bool[source]

Push all records when no inputs are connected.

plugin_driver
push_all_metadata()None[source]

Push all metadata for anchors.

raise_missing_inputs() → NoReturn[source]

Send a missing incoming inputs error to Designer.

record_batch_size
property required_input_anchors

Get the list of required input anchors for this tool.

tool_id
property tool_name

Getter for the tool name.

user_plugin
user_plugin_class: Type['Plugin'] = None
workflow_config

ayx_plugin_sdk.providers.e1_provider.e1_provider module

E1 SDK Provider Class.

class ayx_plugin_sdk.providers.e1_provider.e1_provider.E1Provider(plugin_proxy: E1PluginProxy, workflow_config: WorkflowConfiguration)[source]

Bases: ayx_plugin_sdk.core.provider_base.ProviderBase

Provides resources generated from the E1 Python SDK.

property environment

Get the Environment object from this provider.

Returns

An instance of a concrete Environment object.

Return type

EnvironmentBase

get_input_anchor(name: str)ayx_plugin_sdk.providers.e1_provider.e1_input_anchor.E1InputAnchor[source]

Get an input anchor by name.

Parameters

name – The name of the anchor to get.

Returns

An instance of a concrete InputAnchorBase object with the name requested.

Return type

InputAnchorBase

get_output_anchor(name: str)ayx_plugin_sdk.providers.e1_provider.e1_output_anchor.E1OutputAnchor[source]

Get an output anchor by name.

Parameters

name – The name of the anchor to get.

Returns

An instance of a concrete OutputAnchorBase object with the name requested.

Return type

OutputAnchorBase

property io

Get the IO object from this provider.

Returns

An instance of a concrete IO object.

Return type

IoBase

property logger

Get the logger for the provider.

Returns

Python logging object.

Return type

Logger

property tool_config

Get config xml.

ayx_plugin_sdk.providers.e1_provider.e1_record_packet module

E1 SDK Record Packet Definition.

class ayx_plugin_sdk.providers.e1_provider.e1_record_packet.E1RecordPacket(metadata: ayx_plugin_sdk.core.metadata.Metadata, df: pd.DataFrame)[source]

Bases: ayx_plugin_sdk.core.record_packet.RecordPacket

E1 SDK Record Packet definition.

ayx_plugin_sdk.providers.e1_provider.events module

Observable event definitions.

class ayx_plugin_sdk.providers.e1_provider.events.ConnectionEvents[source]

Bases: enum.Enum

Events for connection objects.

CONNECTION_CLOSED = 'connection_closed'
CONNECTION_INITIALIZED = 'connection_initialized'
PROGRESS_UPDATE = 'progress_update'
RECORD_RECEIVED = 'record_received'
class ayx_plugin_sdk.providers.e1_provider.events.PluginEvents[source]

Bases: object

Events for plugin objects.

INCOMING_CONNECTION_ADDED = 'pi_add_incoming_connection'
OUTGOING_CONNECTION_ADDED = 'pi_add_outgoing_connection'
PI_CLOSE = 'pi_close'
PI_INIT = 'pi_init'
PI_PUSH_ALL_RECORDS = 'pi_push_all_records'
PLUGIN_FAILURE = 'plugin_failure'
PLUGIN_INITIALIZED = 'plugin_initialized'

ayx_plugin_sdk.providers.e1_provider.tool_config_loader module

Tool configuration loader definition.

class ayx_plugin_sdk.providers.e1_provider.tool_config_loader.ToolConfigLoader(tool_name: str)[source]

Bases: object

Tool configuration loader definition.

get_tool_config() → Dict[str, Any][source]

Get the tool config of this tool from it’s config.xml file.

get_tool_config_filepath()pathlib.Path[source]

Get the path to the tool configuration file.

get_tool_path()pathlib.Path[source]

Get the path to the directory containing the current tool’s definition.

get_tools_location()pathlib.Path[source]

Get the location of Alteryx tools that contain the current tool.

ayx_plugin_sdk.providers.e1_provider.workflow_config module

Alteryx tool workflow configuration definition.

class ayx_plugin_sdk.providers.e1_provider.workflow_config.WorkflowConfiguration(config_str: str)[source]

Bases: collections.UserDict

Workflow configuration.

data
original_data

Module contents

E1 SDK Provider interface.

class ayx_plugin_sdk.providers.e1_provider.E1PluginProxy(tool_id: int, alteryx_engine: AlteryxPythonSDK.AlteryxEngine, output_anchor_mgr: AlteryxPythonSDK.OutputAnchorManager)[source]

Bases: ayx_plugin_sdk.core.observable_mixin.ObservableMixin

Base plugin to inherit from.

property all_connections_closed

Getter for if all input connections are closed.

property all_connections_initialized

Getter for if all input connections are initialized.

property all_required_connections_connected

Getter for if all required connections are connected.

anchor_builder
property callback_strategy

Generate the callback strategy for the tool.

close_output_anchors()None[source]

Close connection for all output anchors.

configure_logger()None[source]

Configure the logger.

engine
property environment

Get the Environment object from this provider.

failure_occurred
get_input_anchor(input_anchor_name: str)ayx_plugin_sdk.providers.e1_provider.e1_input_anchor_proxy.E1InputAnchorProxy[source]

Get an input anchor by name.

get_output_anchor(output_anchor_name: str)ayx_plugin_sdk.providers.e1_provider.e1_output_anchor_proxy.E1OutputAnchorProxy[source]

Get an output anchor by name.

handle_plugin_error(e: Exception)None[source]

Log a plugin error to the log and a generic error to Designer.

initialized
input_anchors
property io

Get the IO object from this provider.

property log_directory

Get the log directory.

property log_filepath

Get the log filename.

property logger

Get logger.

output_anchors
pi_add_incoming_connection(anchor_name: str, connection_name: str)ayx_plugin_sdk.providers.e1_provider.connection_interface.ConnectionInterface[source]

Add incoming connection to the tool from the engine.

pi_add_outgoing_connection(anchor_name: str)bool[source]

Register an outgoing connection from this tool.

pi_close(b_has_errors: bool)None[source]

pi_close is useless. Never use it.

pi_init(workflow_config_xml_string: str)None[source]

Plugin initialization from the engine.

pi_push_all_records(n_record_limit: int)bool[source]

Push all records when no inputs are connected.

plugin_driver
push_all_metadata()None[source]

Push all metadata for anchors.

raise_missing_inputs() → NoReturn[source]

Send a missing incoming inputs error to Designer.

record_batch_size
property required_input_anchors

Get the list of required input anchors for this tool.

tool_id
property tool_name

Getter for the tool name.

user_plugin
user_plugin_class: Type['Plugin'] = None
workflow_config
class ayx_plugin_sdk.providers.e1_provider.E1Environment(engine: AlteryxPythonSDK.AlteryxEngine, tool_id: int, plugin_proxy: E1PluginProxy)[source]

Bases: ayx_plugin_sdk.core.environment_base.EnvironmentBase

Environment variables for designer.

property alteryx_install_dir

Get the alteryx install directory.

property alteryx_locale

Retrieve locale code from alteryx user settings.

property designer_version

Return the version of designer that is being used.

Returns

A version in the format of 1.2.3.4

Return type

str

property update_mode

Get the type of update running.

property update_only

Check if the engine is running in update only mode.

Returns

True if running in update only.

Return type

bool

update_tool_config(new_config: dict)None[source]

Update the tool’s configuration.

Parameters

new_config – The new configuration to set for the tool.

Returns

Return type

None

property workflow_dir

Get the directory for the currently running workflow.

class ayx_plugin_sdk.providers.e1_provider.E1InputAnchor(input_anchor_proxy: ayx_plugin_sdk.providers.e1_provider.e1_input_anchor_proxy.E1InputAnchorProxy)[source]

Bases: ayx_plugin_sdk.core.input_anchor_base.InputAnchorBase

Input anchor to the tool.

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

class ayx_plugin_sdk.providers.e1_provider.E1IO(engine: AlteryxPythonSDK.AlteryxEngine, tool_id: int)[source]

Bases: ayx_plugin_sdk.core.io_base.IoBase

Class wrapping all IO communication with Alteryx 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.

class ayx_plugin_sdk.providers.e1_provider.E1OutputAnchor(output_anchor_proxy: ayx_plugin_sdk.providers.e1_provider.e1_output_anchor_proxy.E1OutputAnchorProxy, engine: AlteryxPythonSDK.AlteryxEngine)[source]

Bases: ayx_plugin_sdk.core.output_anchor_base.OutputAnchorBase

Output anchor definition.

property allow_multiple

Get the status of if multiple connections are allowed.

Returns

Boolean indicating if multiple connections are allowed.

Return type

bool

close()None[source]

Close the outgoing connection.

flush()None[source]

Flush the written records for this output connection.

property is_open

Get if the anchor is open.

property metadata

Get the anchor metadata.

property name

Get the name of the output anchor.

Returns

The name of the output anchor.

Return type

str

property num_connections

Get the number of connections attached to the anchor.

Returns

The number of downstream connections on this anchor.

Return type

int

open(metadata: ayx_plugin_sdk.core.metadata.Metadata)None[source]

Open the output anchor.

Write the outgoing record metadata and open this connection for outgoing packets.

Parameters

metadata – The metadata to set for this anchor.

property optional

Get the status of if the input anchor is optional.

Returns

Boolean indicating if input anchor is optional.

Return type

bool

update_progress(percent: float)None[source]

Update the progress on downstream connections.

Parameters

percentage – The percentage to write to Designer, indicating the progress of output on this anchor.

write(record_packet: RecordPacketBase)None[source]

Write a RecordPacket to the outgoing connection.

Parameters

record_packet – The record packet to write to the output anchor.

class ayx_plugin_sdk.providers.e1_provider.E1Provider(plugin_proxy: E1PluginProxy, workflow_config: WorkflowConfiguration)[source]

Bases: ayx_plugin_sdk.core.provider_base.ProviderBase

Provides resources generated from the E1 Python SDK.

property environment

Get the Environment object from this provider.

Returns

An instance of a concrete Environment object.

Return type

EnvironmentBase

get_input_anchor(name: str)ayx_plugin_sdk.providers.e1_provider.e1_input_anchor.E1InputAnchor[source]

Get an input anchor by name.

Parameters

name – The name of the anchor to get.

Returns

An instance of a concrete InputAnchorBase object with the name requested.

Return type

InputAnchorBase

get_output_anchor(name: str)ayx_plugin_sdk.providers.e1_provider.e1_output_anchor.E1OutputAnchor[source]

Get an output anchor by name.

Parameters

name – The name of the anchor to get.

Returns

An instance of a concrete OutputAnchorBase object with the name requested.

Return type

OutputAnchorBase

property io

Get the IO object from this provider.

Returns

An instance of a concrete IO object.

Return type

IoBase

property logger

Get the logger for the provider.

Returns

Python logging object.

Return type

Logger

property tool_config

Get config xml.