SDK Resources

Explore these resources to customize and extend the power of Alteryx with SDKs, APIs, and more.

Python SDK v2

Alteryx_IO_Team
Alteryx
Alteryx
Created

Python SDK v2

Version 2 of AYX Python SDK is now available. For the best experience, and to ensure compatibility with the most recent versions of Designer, please use v2 of AYX Python SDK.

Overview

The AYX Python SDK lets you extend the functionality of Alteryx Designer via custom tools and plugins. This SDK serves as the back-end engine component. Combine it with the AYX UI SDK (which serves as the user interface component) to create your custom tool or plugin.

Engine Compatibility

The AYX Python SDK requires that the AMP Engine is enabled.

Requirements and Prerequisites

To get started with the AYX Python SDK, you need these items installed on your machine:

  • Microsoft Windows 7 or Later (64-bit)
  • Python Version 3.8.5*
  • Alteryx Designer Version 2021.4

*if you are building a tool for Designer 2024.1, you should use Python 3.10.13 and access the Beta version via Public Preview.

Installation

To install the AYX Python SDK, run pip install ayx-python-sdk.

  • This command provides the AYX Plugin CLI (top-level CLI) as well as the AMP Provider classes.
  • The AYX Plugin CLI uses the Python SDK CLI to manage the creation and installation of Python tools.

As noted above, you can install the package via pip. Any updates to packages will also be available on pip. You do not need to update or manage this package directly since it is a dependency of the AYX Plugin CLI.

AYX Python SDK Documentation

You can access the AYX Python SDK documentation at https://alteryx.github.io/ayx-python-sdk/index.html. Additionally, after you install the AYX Python SDK distribution, you can run ayx_python_sdk docs to access the help documentation locally.

Comments
AimB3
6 - Meteoroid

Hi, 

I've tried the above steps with some slight modifications in order to create a custom tool, I just wanted the scaffolding so that I can slowly add my modifications, but even that didn't work. 

The Error I encounter is : 

    Error: Test Tool (10): Internal Error - Deadlock detected (@1)

Here is what I tried: 

  1. Created a conda environment 
    1. create -n alteryx_env python==3.8.16
    2. My company is limited to alteryx 23.2.1.133, hence this specific python version
  2. Activated the environment and : 
    1. Installed the sdk : pip install ayx-python-sdk
    2. Installed the cli : pip install ayx-plugin-cli
    3. Initiated the workspace : ayx_plugin_cli sdk-workslpace-init
    4. All settings were left at default, except for backend language which is python
  3. Before creating the tool, I installed nodejs for the ui : conda install -c anaconda nodejs=16.13.1
  4. Creating the tool:
    1. ayx_plugin_cli create-ayx-plugin
    2. All values left as default except for the tool type, here I tried multiple, with no avail, always encountering the same error as above
    3. I've tried both with the UI component and omitting it
  5. *I've installed the materials ui library but never got to play with it since the tool doesn't work in designer:npm install @Alteryx/ui

 

What I've tried so far : 

  • Deleting the .shiv folder as it can cause conflicts
  • Deleting the .ayx_cli.cache folder before each build
  • Generating the tool with and without ui components : --omit-ui
  • Altered the npm run build script in the ui/Tool folder: "build": "npm install --legacy-peer-deps && webpack --config webpack.prod.js" , this solved a webpack error

I should note that I am able to run npm run start with the modification mentioned above and I can see my changes in the ui reflected in the browser but in Designer, the same error appears: 

 

 

Versions : 

python 3.8.16

nodejs 16.13.1

ayx-plugin-cli 1.2.1

ayx-python-sdk 2.4.1

 

Is there anything I'm missing?