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[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.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.
-
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.
-
-
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.
-
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.
-
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
¶
-
name
¶
-
plugin_failed
¶
-
plugin_proxy
¶
-
progress_percentage
¶
-
record_batch_size
¶
-
record_containers
¶
-
property
record_info
¶ 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:
ayx_python_sdk.core.dcm_base.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.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.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:
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:
-
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
proxy_configuration
¶ Retrieve proxy config from UserSettings.xml.
-
property
tool_id
¶ Get the current tool’s workflow ID.
- Returns:
Tool’s ID (specified by developer).
- Return type:
-
property
update_mode
¶ Get the type of update running.
- Returns:
Enumeration corresponding to the update mode that the workflow is running in.
- Return type:
-
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:
-
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:
-
property
workflow_dir
¶ Get the directory for the currently-running workflow.
- Returns:
The workflow directory as a Path object.
- Return type:
Path
-
property
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:
-
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:
-
property
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: 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:
-
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
progress
¶ Get the progress percentage of records received on this input connection.
- Returns:
The progress percentage of the connection.
- Return type:
-
property
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]¶ 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: 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:
-
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:
-
property
num_connections
¶ Get the number of connections attached to the anchor.
- Returns:
The number of downstream connections on this anchor.
- Return type:
-
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:
-
property
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
¶
-
name
¶
-
num_connections
¶
-
optional
¶
-
push_records
¶
-
property
record_info
¶ Getter for record info.
-
ayx_python_sdk.providers.e1_provider.e1_plugin_driver module¶
E1 SDK Driver Class.
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.
-
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_push_all_records
(n_record_limit: int) → bool[source]¶ Push all records when no inputs are connected.
-
plugin_driver
¶
-
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
¶
-
property
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
dcm
¶ Get the DCM object from this provider.
- Returns:
An instance of a concrete Dcm object.
- Return type:
Dcm
-
property
environment
¶ Get the Environment object from this provider.
- Returns:
An instance of a concrete Environment object.
- Return type:
-
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:
-
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:
-
property
io
¶ Get the IO (input/output) object from this provider.
- Returns:
An instance of a concrete IO object.
- Return type:
-
property
logger
¶ Get the Logger for the provider.
- Returns:
Python logging object.
- Return type:
Logger
-
property
tool_config
¶ Get config XML.
-
property
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.
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.
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.
-
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_push_all_records
(n_record_limit: int) → bool[source]¶ Push all records when no inputs are connected.
-
plugin_driver
¶
-
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
¶
-
property
-
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:
-
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
proxy_configuration
¶ Retrieve proxy config from UserSettings.xml.
-
property
tool_id
¶ Get the current tool’s workflow ID.
- Returns:
Tool’s ID (specified by developer).
- Return type:
-
property
update_mode
¶ Get the type of update running.
- Returns:
Enumeration corresponding to the update mode that the workflow is running in.
- Return type:
-
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:
-
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:
-
property
workflow_dir
¶ Get the directory for the currently-running workflow.
- Returns:
The workflow directory as a Path object.
- Return type:
Path
-
property
-
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:
-
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:
-
property
-
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]¶ 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.
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:
-
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:
-
property
num_connections
¶ Get the number of connections attached to the anchor.
- Returns:
The number of downstream connections on this anchor.
- Return type:
-
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:
-
property
-
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
dcm
¶ Get the DCM object from this provider.
- Returns:
An instance of a concrete Dcm object.
- Return type:
Dcm
-
property
environment
¶ Get the Environment object from this provider.
- Returns:
An instance of a concrete Environment object.
- Return type:
-
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:
-
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:
-
property
io
¶ Get the IO (input/output) object from this provider.
- Returns:
An instance of a concrete IO object.
- Return type:
-
property
logger
¶ Get the Logger for the provider.
- Returns:
Python logging object.
- Return type:
Logger
-
property
tool_config
¶ Get config XML.
-
property