Python SDK v2
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Notify Moderator
on 05-16-2023 10:47 PM - edited on 10-29-2024 11:22 AM by baileykaplan
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.
- To learn more about v2 of the AYX Python SDK, go to Changes and Improvements to Python SDK in v2.0.0.
- If you need to access v1 documentation, you can download the content.
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.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Notify Moderator
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:
- Created a conda environment
- create -n alteryx_env python==3.8.16
- My company is limited to alteryx 23.2.1.133, hence this specific python version
- Activated the environment and :
- Installed the sdk : pip install ayx-python-sdk
- Installed the cli : pip install ayx-plugin-cli
- Initiated the workspace : ayx_plugin_cli sdk-workslpace-init
- All settings were left at default, except for backend language which is python
- Before creating the tool, I installed nodejs for the ui : conda install -c anaconda nodejs=16.13.1
- Creating the tool:
- ayx_plugin_cli create-ayx-plugin
- All values left as default except for the tool type, here I tried multiple, with no avail, always encountering the same error as above
- I've tried both with the UI component and omitting it
- *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?