ayx_python_sdk.providers.e1_provider package¶
Subpackages¶
- ayx_python_sdk.providers.e1_provider.mock_e1_sdk package
- Subpackages
- ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK package
- Submodules
- ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK.alteryx_engine module
- ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK.constants module
- ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK.field module
- ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK.output_anchor module
- ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK.output_anchor_manager module
- ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK.record_copier module
- ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK.record_creator module
- ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK.record_info module
- ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK.record_ref module
- ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK.tool module
- ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK.tool_execution_info module
- Module contents
- ayx_python_sdk.providers.e1_provider.mock_e1_sdk.AlteryxPythonSDK package
- Module contents
- Subpackages
- ayx_python_sdk.providers.e1_provider.proxies package
- ayx_python_sdk.providers.e1_provider.records package
- ayx_python_sdk.providers.e1_provider.utilities package
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[E1InputAnchorProxy] [source]¶
Build the input anchors based on tool config settings.
- build_output_anchors() List[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.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 for callback strategy.
- connection_initialized_callback(connection: ConnectionInterface, **_: Any) None [source]¶
Run callback for connection initialization.
- plugin_proxy¶
- abstract record_received_callback(connection: ConnectionInterface, **_: Any) None [source]¶
Run callback for when a record is received.
- class ayx_python_sdk.providers.e1_provider.connection_callback_strategy.UpdateOnlyConnectionCallbackStrategy(plugin_proxy: E1PluginProxy)[source]¶
Bases:
ConnectionCallbackStrategy
Callback strategy for update only runs.
- plugin_proxy¶
- record_received_callback(connection: 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:
ConnectionCallbackStrategy
Callback strategy for workflow runs.
- plugin_proxy¶
- record_received_callback(connection: 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:
ObservableMixin
Connection interface definition.
- add_record_container(container: BaseRecordContainer) None [source]¶
Add a new record container.
- anchor¶
- ii_init(record_info: AlteryxPythonSDK.RecordInfo) bool [source]¶
Initialize the connection.
- ii_push_record(record: AlteryxPythonSDK.RecordRef) bool [source]¶
Receive a record.
- name¶
- plugin_failed¶
- plugin_proxy¶
- progress_percentage¶
- record_containers: List[BaseRecordContainer]¶
- property record_info: Optional[AlteryxPythonSDK.RecordInfo]¶
Getter for record info.
- status¶
ayx_python_sdk.providers.e1_provider.e1_dcm module¶
E1 Provider: Proxy class for DCM API.
- class ayx_python_sdk.providers.e1_provider.e1_dcm.E1ProviderDCM[source]¶
Bases:
DcmBase
Class that wraps DCM API work.
- free_write_lock(connection_id: str, role: str, secret_type: str, lock_id: str) None [source]¶
Free a lock obtained from a previous call to get_write_lock().
- Parameters:
connection_id – string with UUID of connection
role – A role such as ?oauth?
secret_type – A secret type such as ?oauth_token?
lock_id – A lock_id acquired from a previous call to get_write_lock()
- get_connection(connection_id: str) Dict [source]¶
Retrieve connection information including secrets by connection ID.
- Parameters:
connection_id – string with UUID of connection
- get_write_lock(connection_id: str, role: str, secret_type: str, expires_in: Optional[datetime]) Dict [source]¶
Attempt to acquire an exclusive write lock.
- Parameters:
connection_id – string with UUID of connection
role – A role such as ?oauth?
secret_type – A secret type such as ?oauth_token?
expires_in – (Optional) A DateTime value in which to ask for the lock to be held for in milliseconds. Defaults to 0.
- update_connection_secret(connection_id: str, lock_id: str, role: str, secret_type: str, value: str, expires_on: Optional[datetime], parameters: Optional[Dict[str, str]]) Dict [source]¶
Update a single secret for role and secret_type to value as well as the optional expires_on and parameters.
- Parameters:
connection_id – A connection ID
lock_id – A lock ID acquired from get_write_lock()
role – A role such as ?oauth?
secret_type – A secret type such as ?oauth_token?
value – The new value to store for the secret
expires_on – (Optional) DateTime of expiration of this secret
parameters – Dict of parameter values for this secret (this is arbitrary user data stored as JSON)
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:
EnvironmentBase
Environment variables for Designer.
- property alteryx_install_dir: Path¶
Get the Alteryx install directory.
- Returns:
The Alteryx install directory as a Path object.
- Return type:
Path
- property alteryx_locale: Literal['en', 'it', 'fr', 'de', 'ja', 'es', 'pt', 'zh']¶
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: str¶
Return the version of Designer that is being used.
- Returns:
A version in the format of 1.2.3.4
- Return type:
- get_settings_conf(keys: list, version_override: str = '') dict [source]¶
Parse xml to retrieve settings.
- parse_settings_key_value(settings_str: str, line_delimiter: str = '\n', key_delimiter: str = '=') dict [source]¶
Extract a key value pair from an xml text entry set by Designer.
- property tool_id: int¶
Get the current tool’s workflow ID.
- Returns:
Tool’s ID (specified by developer).
- Return type:
- property update_mode: UpdateMode¶
Get the type of update running.
- Returns:
Enumeration corresponding to the update mode that the workflow is running in.
- Return type:
- property update_only: bool¶
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:
- update_tool_config(new_config: dict) None [source]¶
Update the tool’s configuration.
- Parameters:
new_config – The new configuration to set for the tool.
- Return type:
None
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: E1InputAnchorProxy)[source]¶
Bases:
InputAnchorBase
Input anchor to the tool.
- property allow_multiple: bool¶
Get the status that indicates if multiple connections are allowed.
- Returns:
Boolean value that indicates if multiple connections are allowed.
- Return type:
- property connections: List[InputConnectionBase]¶
Get the anchor connections.
- Returns:
List of all the connections associated with the anchor.
- Return type:
List[InputConnectionBase]
ayx_python_sdk.providers.e1_provider.e1_input_anchor_proxy module¶
Alteryx plugin input anchor definition.
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: ConnectionInterface)[source]¶
Bases:
InputConnectionBase
Class for managing Inputs in E1 SDK.
- property anchor: E1InputAnchor¶
Get the anchor this input connection is associated with.
- Returns:
The anchor this input connection is associated with.
- Return type:
- property metadata: Optional[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 progress: float¶
Get the progress percentage of records received on this input connection.
- Returns:
The progress percentage of the connection.
- Return type:
- 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:
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:
IoBase
Class that wraps all IO communication with Alteryx Designer.
- create_temp_file(extension: str = 'tmp', options: int = 0) 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]¶
Deprecated since version 1.0.3: This will be removed in 2.0.0. Use functions of provider’s dcm property instead
- 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:
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: E1OutputAnchorProxy, engine: AlteryxPythonSDK.AlteryxEngine)[source]¶
Bases:
OutputAnchorBase
Output anchor definition.
- property allow_multiple: bool¶
Get the status that indicates if multiple connections are allowed.
- Returns:
Boolean value that indicates if multiple connections are allowed.
- Return type:
- property name: str¶
Get the name of the output anchor.
- Returns:
The name of the output anchor.
- Return type:
- property num_connections: int¶
Get the number of connections attached to the anchor.
- Returns:
The number of downstream connections on this anchor.
- Return type:
- 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.
- property optional: bool¶
Get the status that indicates if the output anchor is optional.
- Returns:
Boolean value that indicates if output anchor is optional.
- Return type:
- 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(value)[source]¶
Bases:
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¶
- engine_anchor_ref: AlteryxPythonSDK.OutputAnchor¶
- name¶
- optional¶
- property record_info: Optional[AlteryxPythonSDK.RecordInfo]¶
Getter for record info.
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.
- 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:
ObservableMixin
Base plugin to inherit from.
- property all_connections_initialized: bool¶
Getter that indicates if all input connections are initialized.
- property all_required_connections_connected: bool¶
Getter that indicates if all required connections are connected.
- anchor_builder: Optional[AnchorBuilder]¶
- property callback_strategy: ConnectionCallbackStrategy¶
Generate the callback strategy for the tool.
- engine¶
- property environment: E1Environment¶
Get the Environment object from this provider.
- failure_occurred¶
- get_input_anchor(input_anchor_name: str) E1InputAnchorProxy [source]¶
Get an input anchor by name.
- get_output_anchor(output_anchor_name: str) 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: List[E1InputAnchorProxy]¶
- output_anchors: List[E1OutputAnchorProxy]¶
- pi_add_incoming_connection(anchor_name: str, connection_name: str) 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_push_all_records(n_record_limit: int) bool [source]¶
Push all records when no inputs are connected.
- plugin_driver: Optional[E1PluginDriver]¶
- property required_input_anchors: List[E1InputAnchorProxy]¶
Get the list of required input anchors for this tool.
- tool_config_loader¶
- tool_id¶
- 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¶
- 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:
ProviderBase
Provides resources generated from the E1 Python SDK.
- property dcm: E1DCM¶
Get the DCM object from this provider.
- Returns:
An instance of a concrete Dcm object.
- Return type:
Dcm
- property environment: E1Environment¶
Get the Environment object from this provider.
- Returns:
An instance of a concrete Environment object.
- Return type:
- get_input_anchor(name: str) 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:
- get_output_anchor(name: str) 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:
- property io: E1IO¶
Get the IO (input/output) object from this provider.
- Returns:
An instance of a concrete IO object.
- Return type:
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: Metadata, df: pd.DataFrame)[source]¶
Bases:
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(value)[source]¶
Bases:
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_install_metadata() ToolInstallMetadata [source]¶
Get tool install metadata.
ayx_python_sdk.providers.e1_provider.workflow_config module¶
Alteryx tool workflow configuration definition.
Module contents¶
E1 SDK Provider interface.
- class ayx_python_sdk.providers.e1_provider.E1Environment(engine: AlteryxPythonSDK.AlteryxEngine, tool_id: int, plugin_proxy: E1PluginProxy)[source]¶
Bases:
EnvironmentBase
Environment variables for Designer.
- property alteryx_install_dir: Path¶
Get the Alteryx install directory.
- Returns:
The Alteryx install directory as a Path object.
- Return type:
Path
- property alteryx_locale: Literal['en', 'it', 'fr', 'de', 'ja', 'es', 'pt', 'zh']¶
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: str¶
Return the version of Designer that is being used.
- Returns:
A version in the format of 1.2.3.4
- Return type:
- get_settings_conf(keys: list, version_override: str = '') dict [source]¶
Parse xml to retrieve settings.
- parse_settings_key_value(settings_str: str, line_delimiter: str = '\n', key_delimiter: str = '=') dict [source]¶
Extract a key value pair from an xml text entry set by Designer.
- property tool_id: int¶
Get the current tool’s workflow ID.
- Returns:
Tool’s ID (specified by developer).
- Return type:
- property update_mode: UpdateMode¶
Get the type of update running.
- Returns:
Enumeration corresponding to the update mode that the workflow is running in.
- Return type:
- property update_only: bool¶
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:
- update_tool_config(new_config: dict) None [source]¶
Update the tool’s configuration.
- Parameters:
new_config – The new configuration to set for the tool.
- Return type:
None
- class ayx_python_sdk.providers.e1_provider.E1IO(engine: AlteryxPythonSDK.AlteryxEngine, tool_id: int)[source]¶
Bases:
IoBase
Class that wraps all IO communication with Alteryx Designer.
- create_temp_file(extension: str = 'tmp', options: int = 0) 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]¶
Deprecated since version 1.0.3: This will be removed in 2.0.0. Use functions of provider’s dcm property instead
- 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:
- class ayx_python_sdk.providers.e1_provider.E1InputAnchor(input_anchor_proxy: E1InputAnchorProxy)[source]¶
Bases:
InputAnchorBase
Input anchor to the tool.
- property allow_multiple: bool¶
Get the status that indicates if multiple connections are allowed.
- Returns:
Boolean value that indicates if multiple connections are allowed.
- Return type:
- property connections: List[InputConnectionBase]¶
Get the anchor connections.
- Returns:
List of all the connections associated with the anchor.
- Return type:
List[InputConnectionBase]
- class ayx_python_sdk.providers.e1_provider.E1OutputAnchor(output_anchor_proxy: E1OutputAnchorProxy, engine: AlteryxPythonSDK.AlteryxEngine)[source]¶
Bases:
OutputAnchorBase
Output anchor definition.
- property allow_multiple: bool¶
Get the status that indicates if multiple connections are allowed.
- Returns:
Boolean value that indicates if multiple connections are allowed.
- Return type:
- property name: str¶
Get the name of the output anchor.
- Returns:
The name of the output anchor.
- Return type:
- property num_connections: int¶
Get the number of connections attached to the anchor.
- Returns:
The number of downstream connections on this anchor.
- Return type:
- 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.
- property optional: bool¶
Get the status that indicates if the output anchor is optional.
- Returns:
Boolean value that indicates if output anchor is optional.
- Return type:
- 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.E1PluginProxy(tool_id: int, alteryx_engine: AlteryxPythonSDK.AlteryxEngine, output_anchor_mgr: AlteryxPythonSDK.OutputAnchorManager)[source]¶
Bases:
ObservableMixin
Base plugin to inherit from.
- property all_connections_initialized: bool¶
Getter that indicates if all input connections are initialized.
- property all_required_connections_connected: bool¶
Getter that indicates if all required connections are connected.
- anchor_builder: Optional[AnchorBuilder]¶
- property callback_strategy: ConnectionCallbackStrategy¶
Generate the callback strategy for the tool.
- engine¶
- property environment: E1Environment¶
Get the Environment object from this provider.
- failure_occurred¶
- get_input_anchor(input_anchor_name: str) E1InputAnchorProxy [source]¶
Get an input anchor by name.
- get_output_anchor(output_anchor_name: str) 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: List[E1InputAnchorProxy]¶
- output_anchors: List[E1OutputAnchorProxy]¶
- pi_add_incoming_connection(anchor_name: str, connection_name: str) 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_push_all_records(n_record_limit: int) bool [source]¶
Push all records when no inputs are connected.
- plugin_driver: Optional[E1PluginDriver]¶
- property required_input_anchors: List[E1InputAnchorProxy]¶
Get the list of required input anchors for this tool.
- tool_config_loader¶
- tool_id¶
- 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¶
- workflow_config¶
- class ayx_python_sdk.providers.e1_provider.E1Provider(plugin_proxy: E1PluginProxy, workflow_config: WorkflowConfiguration)[source]¶
Bases:
ProviderBase
Provides resources generated from the E1 Python SDK.
- property dcm: E1DCM¶
Get the DCM object from this provider.
- Returns:
An instance of a concrete Dcm object.
- Return type:
Dcm
- property environment: E1Environment¶
Get the Environment object from this provider.
- Returns:
An instance of a concrete Environment object.
- Return type:
- get_input_anchor(name: str) 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:
- get_output_anchor(name: str) 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:
- property io: E1IO¶
Get the IO (input/output) object from this provider.
- Returns:
An instance of a concrete IO object.
- Return type: