ayx_python_sdk.providers.e1_provider package

Subpackages

Submodules

ayx_python_sdk.providers.e1_provider.anchor_builder module

Alteryx tool configuration definition.

class ayx_python_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_python_sdk.providers.e1_provider.e1_input_anchor_proxy.E1InputAnchorProxy][source]

Build the input anchors based on tool config settings.

build_output_anchors() → List[ayx_python_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_python_sdk.providers.e1_provider.cache_e1_sdk_import module

Get the E1 package.

ayx_python_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_python_sdk.providers.e1_provider.connection_callback_strategy module

Connection callback strategy definitions.

class ayx_python_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_python_sdk.providers.e1_provider.connection_interface.ConnectionInterface, **_: Any)None[source]

Run callback for connection initialization.

plugin_proxy
abstract record_received_callback(connection: ayx_python_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_python_sdk.providers.e1_provider.connection_callback_strategy.UpdateOnlyConnectionCallbackStrategy(plugin_proxy: E1PluginProxy)[source]

Bases: ayx_python_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_python_sdk.providers.e1_provider.connection_interface.ConnectionInterface, **_: Any)None[source]

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

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

Bases: ayx_python_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_python_sdk.providers.e1_provider.connection_interface.ConnectionInterface, **_: Any)None[source]

Process single records by batch size.

ayx_python_sdk.providers.e1_provider.connection_interface module

Connection class definitions.

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

Bases: ayx_python_sdk.core.observable_mixin.ObservableMixin

Connection interface definition.

add_record_container(container: ayx_python_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 connection’s 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_python_sdk.providers.e1_provider.connection_interface.ConnectionStatus

Bases: enum.IntEnum

An enumeration.

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

ayx_python_sdk.providers.e1_provider.e1_environment module

Proxy Class for managing SDK Environment.

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

Bases: ayx_python_sdk.core.environment_base.EnvironmentBase

Environment variables for Designer.

property alteryx_install_dir

Get the Alteryx install directory.

Returns

The Alteryx install directory as a Path object.

Return type

Path

property alteryx_locale

Retrieve the locale code from Alteryx Designer User Settings.

Returns

The language/region that Alteryx is using to display messages.

Return type

Locale

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 tool_id

Get the current tool’s workflow ID.

Returns

Tool’s ID (specified by developer).

Return type

int

property update_mode

Get the type of update running.

Returns

Enumeration corresponding to the update mode that the workflow is running in.

Return type

UpdateMode

property update_only

Check if the engine is running in update-only mode.

Returns

Boolean value that indicates if the engine is 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.

Returns

The workflow directory as a Path object.

Return type

Path

ayx_python_sdk.providers.e1_provider.e1_input_anchor module

Alteryx plugin input anchor definition.

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

Bases: ayx_python_sdk.core.input_anchor_base.InputAnchorBase

Input anchor to the tool.

property allow_multiple

Get the status that indicates if multiple connections are allowed.

Returns

Boolean value that indicates if multiple connections are allowed.

Return type

bool

property connections

Get the anchor connections.

Returns

List of all the connections associated with the 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 that indicates if the input anchor is optional.

Returns

Boolean value that indicates if input anchor is optional.

Return type

bool

ayx_python_sdk.providers.e1_provider.e1_input_anchor_proxy module

Alteryx plugin input anchor definition.

class ayx_python_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_python_sdk.providers.e1_provider.e1_input_connection module

E1 SDK Input Connection class.

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

Bases: ayx_python_sdk.core.input_connection_base.InputConnectionBase

Class for managing Inputs in E1 SDK.

property anchor

Get the anchor this input connection is associated with.

Returns

The anchor this input connection is associated with.

Return type

InputAnchorBase

property metadata

Get the connection metadata.

Returns

The metadata associated with this input connection.

This returns 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() → RecordPacket[source]

Read a record packet from the incoming connection.

Returns

A record packet that contains the data received by this connection.

Return type

RecordPacketBase

ayx_python_sdk.providers.e1_provider.e1_io module

Proxy Class for SDK IO.

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

Bases: ayx_python_sdk.core.io_base.IoBase

Class that wraps all IO communication with Alteryx Designer.

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

Create a temporary file managed by Alteryx Designer.

Parameters
  • extension – The extension of the new file.

  • 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, like a browse, that the GUI is responsible for cleaning up.

    2: A temp file for a GUI element, like 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

decrypt_password(password: str)str[source]

Decrypt password.

Parameters

password – Password to decrypt.

Returns

Decrypted password.

Return type

str

error(error_msg: str)None[source]

Display an error message in the Alteryx Designer Results window.

Parameters

error_msg – A string to show as an error in the Designer Results window.

info(info_msg: str)None[source]

Display an info message in the Alteryx Designer Results window.

Parameters

info_msg – A string to show as an info message in the Designer Results window.

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. Refer to the documentation on localization.

Parameters
  • msg – A string to translate.

  • args – Arguments for string interpolation.

Returns

The translated string.

Return type

str

update_progress(percent: float)None[source]

Update tool progress.

Parameters

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

warn(warn_msg: str)None[source]

Display a warning message in the Alteryx Designer Results window.

Parameters

warn_msg – A string to show as a warning in the Designer Results window.

ayx_python_sdk.providers.e1_provider.e1_output_anchor module

Alteryx plugin output anchor definition.

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

Bases: ayx_python_sdk.core.output_anchor_base.OutputAnchorBase

Output anchor definition.

property allow_multiple

Get the status that indicates if multiple connections are allowed.

Returns

Boolean value that indicates 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 status indicating 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_python_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 that indicates if the output anchor is optional.

Returns

Boolean value that indicates if output 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, that indicates 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_python_sdk.providers.e1_provider.e1_output_anchor.OutputAnchorStatus[source]

Bases: enum.Enum

Output anchor status enumeration.

CLOSED = 2
CREATED = 0
OPEN = 1
ayx_python_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_python_sdk.providers.e1_provider.e1_output_anchor_proxy module

Alteryx plugin output anchor definition.

class ayx_python_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_python_sdk.providers.e1_provider.e1_plugin_driver module

E1 SDK Driver Class.

class ayx_python_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_python_sdk.providers.e1_provider.e1_plugin_proxy module

Base plugin definition.

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

Bases: ayx_python_sdk.core.observable_mixin.ObservableMixin

Base plugin to inherit from.

property all_connections_closed

Getter that indicates if all input connections are closed.

property all_connections_initialized

Getter that indicates if all input connections are initialized.

property all_required_connections_connected

Getter that indicates 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_python_sdk.providers.e1_provider.e1_input_anchor_proxy.E1InputAnchorProxy[source]

Get an input anchor by name.

get_output_anchor(output_anchor_name: str)ayx_python_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_python_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_config_loader
tool_id
property tool_name

Getter for the tool name.

update_sys_path()None[source]

Update the sys.path to fix SDK issues.

The sys.path must be updated to include: - The venv path - The tool directory

in order for inline imports to work due to base SDK sys.path manipulation issues.

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

ayx_python_sdk.providers.e1_provider.e1_provider module

E1 SDK Provider Class.

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

Bases: ayx_python_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_python_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_python_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 (input/output) 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_python_sdk.providers.e1_provider.e1_record_packet module

E1 SDK Record Packet Definition.

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

Bases: ayx_python_sdk.core.record_packet.RecordPacket

E1 SDK Record Packet definition.

ayx_python_sdk.providers.e1_provider.events module

Observable event definitions.

class ayx_python_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_python_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_python_sdk.providers.e1_provider.tool_config_loader module

Tool configuration loader definition.

class ayx_python_sdk.providers.e1_provider.tool_config_loader.ToolConfigLoader(tool_directory_name: str)[source]

Bases: object

Tool configuration loader definition.

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

Get the tool config of this tool from its config.xml file.

get_tool_config_filepath()pathlib.Path[source]

Get the path to the tool configuration file.

get_tool_install_metadata()ayx_python_sdk.providers.e1_provider.tool_config_loader.ToolInstallMetadata[source]

Get tool install metadata.

class ayx_python_sdk.providers.e1_provider.tool_config_loader.ToolInstallMetadata(install_path: pathlib.Path, venv_path: pathlib.Path, install_type: ayx_python_sdk.providers.e1_provider.tool_config_loader.ToolInstallType)[source]

Bases: object

Tool installation metadata.

class ayx_python_sdk.providers.e1_provider.tool_config_loader.ToolInstallType[source]

Bases: str, enum.Enum

Tool install type enumeration.

admin = 'admin'
alteryx = 'alteryx'
user = 'user'

ayx_python_sdk.providers.e1_provider.workflow_config module

Alteryx tool workflow configuration definition.

class ayx_python_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_python_sdk.providers.e1_provider.E1PluginProxy(tool_id: int, alteryx_engine: AlteryxPythonSDK.AlteryxEngine, output_anchor_mgr: AlteryxPythonSDK.OutputAnchorManager)[source]

Bases: ayx_python_sdk.core.observable_mixin.ObservableMixin

Base plugin to inherit from.

property all_connections_closed

Getter that indicates if all input connections are closed.

property all_connections_initialized

Getter that indicates if all input connections are initialized.

property all_required_connections_connected

Getter that indicates 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_python_sdk.providers.e1_provider.e1_input_anchor_proxy.E1InputAnchorProxy[source]

Get an input anchor by name.

get_output_anchor(output_anchor_name: str)ayx_python_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_python_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_config_loader
tool_id
property tool_name

Getter for the tool name.

update_sys_path()None[source]

Update the sys.path to fix SDK issues.

The sys.path must be updated to include: - The venv path - The tool directory

in order for inline imports to work due to base SDK sys.path manipulation issues.

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

Bases: ayx_python_sdk.core.environment_base.EnvironmentBase

Environment variables for Designer.

property alteryx_install_dir

Get the Alteryx install directory.

Returns

The Alteryx install directory as a Path object.

Return type

Path

property alteryx_locale

Retrieve the locale code from Alteryx Designer User Settings.

Returns

The language/region that Alteryx is using to display messages.

Return type

Locale

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 tool_id

Get the current tool’s workflow ID.

Returns

Tool’s ID (specified by developer).

Return type

int

property update_mode

Get the type of update running.

Returns

Enumeration corresponding to the update mode that the workflow is running in.

Return type

UpdateMode

property update_only

Check if the engine is running in update-only mode.

Returns

Boolean value that indicates if the engine is 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.

Returns

The workflow directory as a Path object.

Return type

Path

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

Bases: ayx_python_sdk.core.input_anchor_base.InputAnchorBase

Input anchor to the tool.

property allow_multiple

Get the status that indicates if multiple connections are allowed.

Returns

Boolean value that indicates if multiple connections are allowed.

Return type

bool

property connections

Get the anchor connections.

Returns

List of all the connections associated with the 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 that indicates if the input anchor is optional.

Returns

Boolean value that indicates if input anchor is optional.

Return type

bool

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

Bases: ayx_python_sdk.core.io_base.IoBase

Class that wraps all IO communication with Alteryx Designer.

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

Create a temporary file managed by Alteryx Designer.

Parameters
  • extension – The extension of the new file.

  • 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, like a browse, that the GUI is responsible for cleaning up.

    2: A temp file for a GUI element, like 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

decrypt_password(password: str)str[source]

Decrypt password.

Parameters

password – Password to decrypt.

Returns

Decrypted password.

Return type

str

error(error_msg: str)None[source]

Display an error message in the Alteryx Designer Results window.

Parameters

error_msg – A string to show as an error in the Designer Results window.

info(info_msg: str)None[source]

Display an info message in the Alteryx Designer Results window.

Parameters

info_msg – A string to show as an info message in the Designer Results window.

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. Refer to the documentation on localization.

Parameters
  • msg – A string to translate.

  • args – Arguments for string interpolation.

Returns

The translated string.

Return type

str

update_progress(percent: float)None[source]

Update tool progress.

Parameters

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

warn(warn_msg: str)None[source]

Display a warning message in the Alteryx Designer Results window.

Parameters

warn_msg – A string to show as a warning in the Designer Results window.

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

Bases: ayx_python_sdk.core.output_anchor_base.OutputAnchorBase

Output anchor definition.

property allow_multiple

Get the status that indicates if multiple connections are allowed.

Returns

Boolean value that indicates 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 status indicating 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_python_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 that indicates if the output anchor is optional.

Returns

Boolean value that indicates if output 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, that indicates 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_python_sdk.providers.e1_provider.E1Provider(plugin_proxy: E1PluginProxy, workflow_config: WorkflowConfiguration)[source]

Bases: ayx_python_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_python_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_python_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 (input/output) 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.