ayx_plugin_sdk.core package

Submodules

ayx_plugin_sdk.core.doc_utilities module

Utility functions for documentation.

ayx_plugin_sdk.core.doc_utilities.inherit_docs(cls: Type) → Type[source]

Inherit the documentation from parent classes if it doesn’t exist on methods.

ayx_plugin_sdk.core.environment_base module

Runtime environment information.

class ayx_plugin_sdk.core.environment_base.EnvironmentBase[source]

Bases: abc.ABC

Environment information class definition.

This class provides information about the runtime environment of the tool that is running, such as if it is running as update only, the version of the system running, etc.

abstract property alteryx_install_dir

Get the alteryx install directory.

abstract property alteryx_locale

Retrieve locale code from alteryx user settings.

abstract 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

abstract property update_mode

Get the type of update running.

abstract property update_only

Check if the engine is running in update only mode.

Returns

True if running in update only.

Return type

bool

abstract 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

abstract property workflow_dir

Get the directory for the currently running workflow.

class ayx_plugin_sdk.core.environment_base.UpdateMode[source]

Bases: enum.Enum

The types of update mode that can run in Designer.

FULL = 'Full'
NO_UPDATE_MODE = ''
QUICK = 'Quick'

ayx_plugin_sdk.core.exceptions module

Exception definitions.

exception ayx_plugin_sdk.core.exceptions.AnchorNotFoundException[source]

Bases: Exception

Exception for when a requested anchor can’t be found for the tool.

exception ayx_plugin_sdk.core.exceptions.WorkflowRuntimeError(msg: str)[source]

Bases: Exception

Exception for a workflow runtime error.

ayx_plugin_sdk.core.field module

Record field class definition.

class ayx_plugin_sdk.core.field.Field(name: str, field_type: ayx_plugin_sdk.core.field.FieldType, size: int = 0, scale: int = 0, source: Optional[str] = None, description: Optional[str] = None)[source]

Bases: object

A record field that contains metadata such as field name.

class ayx_plugin_sdk.core.field.FieldType[source]

Bases: enum.Enum

Field types. The text values match the Alteryx Engine field types.

blob = 'blob'
bool = 'bool'
byte = 'byte'
date = 'date'
datetime = 'datetime'
double = 'double'
fixeddecimal = 'fixeddecimal'
float = 'float'
int16 = 'int16'
int32 = 'int32'
int64 = 'int64'
spatialobj = 'spatialobj'
string = 'string'
time = 'time'
v_string = 'v_string'
v_wstring = 'v_wstring'
wstring = 'wstring'

ayx_plugin_sdk.core.input_anchor_base module

Input anchor interface definition.

class ayx_plugin_sdk.core.input_anchor_base.InputAnchorBase[source]

Bases: abc.ABC

Input anchor interface definition.

abstract property allow_multiple

Get the status of if multiple connections are allowed.

Returns

Boolean indicating if multiple connections are allowed.

Return type

bool

abstract property connections

Get the anchor connections.

Returns

List of all the connections associated with this anchor.

Return type

List[InputConnectionBase]

abstract property name

Get the name of the input anchor.

Returns

The name of the input anchor.

Return type

str

abstract 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.core.input_connection_base module

InputConnection base class definition.

class ayx_plugin_sdk.core.input_connection_base.InputConnectionBase[source]

Bases: abc.ABC

Input connection that receives data from upstream tools.

abstract property anchor

Get the input anchor this connection is associated with.

Returns

The anchor this input connection is associated with.

Return type

InputAnchorBase

abstract 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

abstract 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

abstract property name

Get the connection name.

Returns

Name of the input connection.

Return type

str

abstract 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.core.io_base module

IO utility functions for reading/writing to Designer.

class ayx_plugin_sdk.core.io_base.IoBase[source]

Bases: abc.ABC

IO base class.

abstract create_temp_file(extension: str = 'tmp', options: int = 0) → 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

abstract 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.

abstract 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.

abstract 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.

abstract update_progress(percent: float)None[source]

Update tool progress.

Parameters

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

abstract 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.core.metadata module

Defines a class for record metadata.

class ayx_plugin_sdk.core.metadata.Metadata(fields: Optional[List[ayx_plugin_sdk.core.field.Field]] = None)[source]

Bases: object

Record metadata class.

This metadata is received by input connections, and written to output anchors. A metadata object is a composition of ordered Field objects.

add_field(name: str, field_type: ayx_plugin_sdk.core.field.FieldType, size: int = 0, scale: int = 0, source: str = '', description: str = '')ayx_plugin_sdk.core.field.Field[source]

Add a field to the record metadata.

Parameters
  • name – The name of the field.

  • field_type – The type of data that this field represents.

  • size

    The size of the data.

    For strings, this is the maximum number of characters. For blobs, this is the maximum number of bytes.

  • scale – The scale of the data. This only applies to fixeddecimal types.

  • source – The source of the data.

  • description – A description about the data that lives in this field.

Returns

The field that was added to the metadata.

Return type

Field

clone()ayx_plugin_sdk.core.metadata.Metadata[source]

Make a deep copy of the record info.

Returns

A copy of this metadata object.

Return type

Metadata

ayx_plugin_sdk.core.observable_mixin module

Observable mixin definition.

class ayx_plugin_sdk.core.observable_mixin.ObservableMixin[source]

Bases: object

Mixin to make an object observable.

An observable object will have two new methods available on it, subscribe, subscribe_all, and notify_topic.

notify_topic(topic: Any, **payload: Any)None[source]

Notify a topic of an event.

This will call any callbacks that have been registered to listen for notifications to this topic. The payload can be any assortment of key value pairs.

Parameters
  • topic – The topic to notify.

  • **payload – Any assortment of key values pairs to be given to the callback functions.

subscribe(topic: Any, callback: Callable)None[source]

Subscribe to a topic.

The callback for this subscription will be called any time the topic is published to. The arguments passed to the callable depend on the payload given by notifier.

Parameters
  • topic – The topic to subscribe to. Any time this class notifies this topic, the callback function will be called.

  • callback – The callback function to be called when the given topic is notified of an event.

subscribe_all(callback: Callable)None[source]

Subscribe to all topics.

The callback for this subscription will be called any time any topic is published to. The arguments passed to the callable depend on the payload given by notifier.

Parameters

callback – The callback function to be called when any topic is notified of an event.

ayx_plugin_sdk.core.output_anchor_base module

Output Anchor Description implementation.

class ayx_plugin_sdk.core.output_anchor_base.OutputAnchorBase[source]

Bases: abc.ABC

Output Anchor base class.

abstract property allow_multiple

Get the status of if multiple connections are allowed.

Returns

Boolean indicating if multiple connections are allowed.

Return type

bool

abstract close()None[source]

Close the outgoing connection.

abstract flush()None[source]

Flush the written records for this output connection.

abstract property is_open

Get if the anchor is open.

abstract property metadata

Get the metadata for the anchor.

abstract property name

Get the name of the output anchor.

Returns

The name of the output anchor.

Return type

str

abstract property num_connections

Get the number of connections attached to the anchor.

Returns

The number of downstream connections on this anchor.

Return type

int

abstract open(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.

abstract property optional

Get the status of if the input anchor is optional.

Returns

Boolean indicating if input anchor is optional.

Return type

bool

abstract update_progress(percentage: 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.

abstract 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.

ayx_plugin_sdk.core.plugin module

The abstract base class definition for plugins.

For a custom plugin, a user will inherit from Plugin and implement all of the abstract methods.

class ayx_plugin_sdk.core.plugin.Plugin(provider: ProviderBase)[source]

Bases: abc.ABC

The abstract base class for Plugin.

abstract on_complete()None[source]

Cleanup any plugin resources, or push records for an input tool.

This method gets called when all other plugin processing is complete.

This method IS NOT called during update only mode.

In this method, a Plugin designer should perform any cleanup for their plugin, or, if the plugin is an input type tool (it has no incoming connections), processing should occur here (record generation).

NOTE: A tool with an optional input anchor and no incoming connections should also write any records to output anchors here.

abstract on_input_connection_opened(input_connection: InputConnectionBase)None[source]

Process an opened input connection.

The method that gets called whenever an input connection is opened.

When an input connection is opened, it receives metadata. Prior to being opened, it’s metadata is None.

This method IS called during update only mode.

In this method, a Plugin designer should make sure to open any output anchors during update only mode in order to ensure that metadata is properly propagated in Designer

Parameters

input_connection – The input connection that was opened.

abstract on_record_packet(input_connection: InputConnectionBase)None[source]

Process any incoming records.

The method that gets called whenever an input connection receives records.

This method IS NOT called during update only mode.

In this method, a Plugin designer should read from the input connection and process the record packet that it produces.

Parameters

input_connection – The input connection that received a record.

ayx_plugin_sdk.core.provider_base module

Record provider implementation.

Record providers will instantiate input and output connections for the tool and pass information along to the record processor.

class ayx_plugin_sdk.core.provider_base.ProviderBase[source]

Bases: abc.ABC

Record provider for the tool.

abstract property environment

Get the Environment object from this provider.

Returns

An instance of a concrete Environment object.

Return type

EnvironmentBase

abstract get_input_anchor(name: str) → InputAnchorBase[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

abstract get_output_anchor(name: str) → OutputAnchorBase[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

abstract property io

Get the IO object from this provider.

Returns

An instance of a concrete IO object.

Return type

IoBase

abstract property logger

Get the logger for the provider.

Returns

Python logging object.

Return type

Logger

abstract property tool_config

Get config xml from this provider.

ayx_plugin_sdk.core.record_packet module

Simple record packet definition.

class ayx_plugin_sdk.core.record_packet.RecordPacket(metadata: ayx_plugin_sdk.core.metadata.Metadata, df: pd.DataFrame)[source]

Bases: ayx_plugin_sdk.core.record_packet_base.RecordPacketBase

Simple record packet based on pandas.

This record packet is a generic format based on the pandas dataframe and the Record class.

classmethod from_dataframe(metadata: ayx_plugin_sdk.core.metadata.Metadata, df: pd.DataFrame) → RecordPacket[source]

Build a packet from a dataframe.

Parameters
  • metadata – The metadata for the record packet

  • df – The dataframe to generate records from

property metadata

Get the packet metadata.

Returns

The metadata for records contained in the packet.

Return type

Metadata

to_dataframe() → pd.DataFrame[source]

Get the packet data as a dataframe.

Returns

The dataframe containing all records in the packet.

Return type

pd.DataFrame

ayx_plugin_sdk.core.record_packet_base module

Record packet base class definition.

class ayx_plugin_sdk.core.record_packet_base.RecordPacketBase[source]

Bases: abc.ABC

Abstract class that describes a record packet.

abstract classmethod from_dataframe(metadata: Metadata, df: pd.DataFrame) → RecordPacketBase[source]

Set the packet data from a dataframe.

Parameters
  • metadata – The metadata for the records

  • df – The dataframe to generate records from

abstract property metadata

Get the packet metadata.

Returns

The metadata for records contained in the packet.

Return type

Metadata

abstract to_dataframe() → pd.DataFrame[source]

Get the packet data as a dataframe.

Returns

The dataframe containing all records in the packet.

Return type

pd.DataFrame

ayx_plugin_sdk.core.register_plugin module

Function definition for registering a plugin with the SDK.

ayx_plugin_sdk.core.register_plugin.register_e1_plugin(user_plugin_class: Type[Plugin]) → Type[E1PluginProxy][source]

Register a plugin with the E1 SDK Provider.

ayx_plugin_sdk.core.register_plugin.register_file_provider_plugin(user_plugin_class: Type[Plugin])None[source]

Register a plugin with the File Provider.

ayx_plugin_sdk.core.register_plugin.register_plugin(plugin_class: Type[Plugin]) → Optional[Type[E1PluginProxy]][source]

Register a plugin with the SDK.

The return value of this function should be assigned to a variable called AyxPlugin in the entrypoint to the tool in order for the E1 Python SDK to properly recognize it.

Module contents

Alteryx Python SDK - Core classes and interfaces.

class ayx_plugin_sdk.core.EnvironmentBase[source]

Bases: abc.ABC

Environment information class definition.

This class provides information about the runtime environment of the tool that is running, such as if it is running as update only, the version of the system running, etc.

abstract property alteryx_install_dir

Get the alteryx install directory.

abstract property alteryx_locale

Retrieve locale code from alteryx user settings.

abstract 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

abstract property update_mode

Get the type of update running.

abstract property update_only

Check if the engine is running in update only mode.

Returns

True if running in update only.

Return type

bool

abstract 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

abstract property workflow_dir

Get the directory for the currently running workflow.

class ayx_plugin_sdk.core.UpdateMode[source]

Bases: enum.Enum

The types of update mode that can run in Designer.

FULL = 'Full'
NO_UPDATE_MODE = ''
QUICK = 'Quick'
class ayx_plugin_sdk.core.Field(name: str, field_type: ayx_plugin_sdk.core.field.FieldType, size: int = 0, scale: int = 0, source: Optional[str] = None, description: Optional[str] = None)[source]

Bases: object

A record field that contains metadata such as field name.

class ayx_plugin_sdk.core.FieldType[source]

Bases: enum.Enum

Field types. The text values match the Alteryx Engine field types.

blob = 'blob'
bool = 'bool'
byte = 'byte'
date = 'date'
datetime = 'datetime'
double = 'double'
fixeddecimal = 'fixeddecimal'
float = 'float'
int16 = 'int16'
int32 = 'int32'
int64 = 'int64'
spatialobj = 'spatialobj'
string = 'string'
time = 'time'
v_string = 'v_string'
v_wstring = 'v_wstring'
wstring = 'wstring'
class ayx_plugin_sdk.core.InputAnchorBase[source]

Bases: abc.ABC

Input anchor interface definition.

abstract property allow_multiple

Get the status of if multiple connections are allowed.

Returns

Boolean indicating if multiple connections are allowed.

Return type

bool

abstract property connections

Get the anchor connections.

Returns

List of all the connections associated with this anchor.

Return type

List[InputConnectionBase]

abstract property name

Get the name of the input anchor.

Returns

The name of the input anchor.

Return type

str

abstract 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.core.InputConnectionBase[source]

Bases: abc.ABC

Input connection that receives data from upstream tools.

abstract property anchor

Get the input anchor this connection is associated with.

Returns

The anchor this input connection is associated with.

Return type

InputAnchorBase

abstract 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

abstract 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

abstract property name

Get the connection name.

Returns

Name of the input connection.

Return type

str

abstract 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

class ayx_plugin_sdk.core.IoBase[source]

Bases: abc.ABC

IO base class.

abstract create_temp_file(extension: str = 'tmp', options: int = 0) → 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

abstract 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.

abstract 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.

abstract 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.

abstract update_progress(percent: float)None[source]

Update tool progress.

Parameters

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

abstract 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.core.Metadata(fields: Optional[List[ayx_plugin_sdk.core.field.Field]] = None)[source]

Bases: object

Record metadata class.

This metadata is received by input connections, and written to output anchors. A metadata object is a composition of ordered Field objects.

add_field(name: str, field_type: ayx_plugin_sdk.core.field.FieldType, size: int = 0, scale: int = 0, source: str = '', description: str = '')ayx_plugin_sdk.core.field.Field[source]

Add a field to the record metadata.

Parameters
  • name – The name of the field.

  • field_type – The type of data that this field represents.

  • size

    The size of the data.

    For strings, this is the maximum number of characters. For blobs, this is the maximum number of bytes.

  • scale – The scale of the data. This only applies to fixeddecimal types.

  • source – The source of the data.

  • description – A description about the data that lives in this field.

Returns

The field that was added to the metadata.

Return type

Field

clone()ayx_plugin_sdk.core.metadata.Metadata[source]

Make a deep copy of the record info.

Returns

A copy of this metadata object.

Return type

Metadata

class ayx_plugin_sdk.core.OutputAnchorBase[source]

Bases: abc.ABC

Output Anchor base class.

abstract property allow_multiple

Get the status of if multiple connections are allowed.

Returns

Boolean indicating if multiple connections are allowed.

Return type

bool

abstract close()None[source]

Close the outgoing connection.

abstract flush()None[source]

Flush the written records for this output connection.

abstract property is_open

Get if the anchor is open.

abstract property metadata

Get the metadata for the anchor.

abstract property name

Get the name of the output anchor.

Returns

The name of the output anchor.

Return type

str

abstract property num_connections

Get the number of connections attached to the anchor.

Returns

The number of downstream connections on this anchor.

Return type

int

abstract open(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.

abstract property optional

Get the status of if the input anchor is optional.

Returns

Boolean indicating if input anchor is optional.

Return type

bool

abstract update_progress(percentage: 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.

abstract 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.core.RecordPacket(metadata: ayx_plugin_sdk.core.metadata.Metadata, df: pd.DataFrame)[source]

Bases: ayx_plugin_sdk.core.record_packet_base.RecordPacketBase

Simple record packet based on pandas.

This record packet is a generic format based on the pandas dataframe and the Record class.

classmethod from_dataframe(metadata: ayx_plugin_sdk.core.metadata.Metadata, df: pd.DataFrame) → RecordPacket[source]

Build a packet from a dataframe.

Parameters
  • metadata – The metadata for the record packet

  • df – The dataframe to generate records from

property metadata

Get the packet metadata.

Returns

The metadata for records contained in the packet.

Return type

Metadata

to_dataframe() → pd.DataFrame[source]

Get the packet data as a dataframe.

Returns

The dataframe containing all records in the packet.

Return type

pd.DataFrame

class ayx_plugin_sdk.core.RecordPacketBase[source]

Bases: abc.ABC

Abstract class that describes a record packet.

abstract classmethod from_dataframe(metadata: Metadata, df: pd.DataFrame) → RecordPacketBase[source]

Set the packet data from a dataframe.

Parameters
  • metadata – The metadata for the records

  • df – The dataframe to generate records from

abstract property metadata

Get the packet metadata.

Returns

The metadata for records contained in the packet.

Return type

Metadata

abstract to_dataframe() → pd.DataFrame[source]

Get the packet data as a dataframe.

Returns

The dataframe containing all records in the packet.

Return type

pd.DataFrame

class ayx_plugin_sdk.core.Plugin(provider: ProviderBase)[source]

Bases: abc.ABC

The abstract base class for Plugin.

abstract on_complete()None[source]

Cleanup any plugin resources, or push records for an input tool.

This method gets called when all other plugin processing is complete.

This method IS NOT called during update only mode.

In this method, a Plugin designer should perform any cleanup for their plugin, or, if the plugin is an input type tool (it has no incoming connections), processing should occur here (record generation).

NOTE: A tool with an optional input anchor and no incoming connections should also write any records to output anchors here.

abstract on_input_connection_opened(input_connection: InputConnectionBase)None[source]

Process an opened input connection.

The method that gets called whenever an input connection is opened.

When an input connection is opened, it receives metadata. Prior to being opened, it’s metadata is None.

This method IS called during update only mode.

In this method, a Plugin designer should make sure to open any output anchors during update only mode in order to ensure that metadata is properly propagated in Designer

Parameters

input_connection – The input connection that was opened.

abstract on_record_packet(input_connection: InputConnectionBase)None[source]

Process any incoming records.

The method that gets called whenever an input connection receives records.

This method IS NOT called during update only mode.

In this method, a Plugin designer should read from the input connection and process the record packet that it produces.

Parameters

input_connection – The input connection that received a record.

class ayx_plugin_sdk.core.ProviderBase[source]

Bases: abc.ABC

Record provider for the tool.

abstract property environment

Get the Environment object from this provider.

Returns

An instance of a concrete Environment object.

Return type

EnvironmentBase

abstract get_input_anchor(name: str) → InputAnchorBase[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

abstract get_output_anchor(name: str) → OutputAnchorBase[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

abstract property io

Get the IO object from this provider.

Returns

An instance of a concrete IO object.

Return type

IoBase

abstract property logger

Get the logger for the provider.

Returns

Python logging object.

Return type

Logger

abstract property tool_config

Get config xml from this provider.

ayx_plugin_sdk.core.register_plugin(plugin_class: Type[Plugin]) → Optional[Type[E1PluginProxy]][source]

Register a plugin with the SDK.

The return value of this function should be assigned to a variable called AyxPlugin in the entrypoint to the tool in order for the E1 Python SDK to properly recognize it.

class ayx_plugin_sdk.core.ProviderBase[source]

Bases: abc.ABC

Record provider for the tool.

abstract property environment

Get the Environment object from this provider.

Returns

An instance of a concrete Environment object.

Return type

EnvironmentBase

abstract get_input_anchor(name: str) → InputAnchorBase[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

abstract get_output_anchor(name: str) → OutputAnchorBase[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

abstract property io

Get the IO object from this provider.

Returns

An instance of a concrete IO object.

Return type

IoBase

abstract property logger

Get the logger for the provider.

Returns

Python logging object.

Return type

Logger

abstract property tool_config

Get config xml from this provider.