ayx_python_sdk.cli package

Submodules

ayx_python_sdk.cli.utilities module

Helper methods for managing the virtual environment.

ayx_python_sdk.cli.utilities.environment_requires_update(workspace: Workspace) bool[source]

Determine if the virtual environments for the tools should be updated.

ayx_python_sdk.cli.utilities.get_alteryx_path() Path[source]

Get the path to Alteryx Designer.

ayx_python_sdk.cli.utilities.get_install_dir() Path[source]

Get the current directory.

ayx_python_sdk.cli.utilities.get_tool_family_attribute_from_config(config_xml_path: Path) str[source]

Get the ToolFamily attribute from the Config.xml file.

ayx_python_sdk.cli.workspace module

Configurations for managing the workspace.

class ayx_python_sdk.cli.workspace.Workspace(*, workspace_dir: Path, tools: List[str], yxi_name: str, tool_family_name: str)[source]

Bases: BaseModel

Class that wraps all workspace configurations and handles basic workspace functions.

add_tool_from_template(tool_name: str, template_tool_name: str) None[source]

Add a tool to the workspace.

classmethod build_workspace(workspace_directory: Path, allow_creation: bool = False) Workspace[source]

Create a workspace instance that wraps the configurations for the given workspace_directory.

build_yxi(output_yxi_path: Path, package_requirements: bool = True) None[source]

Build a YXI for the workspace.

delete_tool(tool_name: str) None[source]

Remove a tool from the workspace.

classmethod migrate_raw_workspace_config(data: Dict) Dict[source]

Migrate raw JSON from old format to new format.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'tool_family_name': FieldInfo(annotation=str, required=True), 'tools': FieldInfo(annotation=List[str], required=True), 'workspace_dir': FieldInfo(annotation=Path, required=True), 'yxi_name': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

tool_family_name: str
tools: List[str]
workspace_dir: Path
write() None[source]

Write the workspace configurations to the workspace directory.

yxi_name: str
exception ayx_python_sdk.cli.workspace.WorkspaceError[source]

Bases: Exception

Exception for workspace errors.

ayx_python_sdk.cli.workspace.remove_whitespace(s: str) str[source]

Remove whitespace from a string.

ayx_python_sdk.cli.yxi_builder module

Class for building YXIs.

class ayx_python_sdk.cli.yxi_builder.YxiBuilder(workspace_dir: Path, output_yxi_path: Path, requirements_tool: str, package_requirements: bool = True)[source]

Bases: object

YXI Builder class.

build_yxi() None[source]

Build the YXI.

ayx_python_sdk.cli.yxi_installer module

Wrappers to handle interactions with YXI Installer.

class ayx_python_sdk.cli.yxi_installer.YxiInstaller(yxi_paths: List[Path], alteryx_path: Path, clean: bool = False, update_venv: bool = False)[source]

Bases: object

Class that wraps install commands from the YXI Installer executable.

Module contents

Command line interface definitions.