Python Tool
Updated Python Tool
As of the 2026.1 Designer release, Interactive Mode is no longer available in the Python tool.
Python development is now supported through a production-first execution model. This means you can edit your Python scripts directly in the tool or in your preferred external Integrated Development Environment (IDE) before you run your workflows.
User Role Requirements
User Role* | Tool/Feature Access |
|---|---|
Full User | ✓ |
Basic User | X |
*Applies to Alteryx One Professional and Enterprise Edition customers on Designer versions 2025.1+.
The Python tool is a code editor for Python users. You should be proficient in Python before you use this tool. After you import the Alteryx Python package via from ayx import Alteryx, refer to Alteryx Python Functions for information about functions you can use via the Python tool in Designer.
Important
Although Designer accepts customer Python code, Alteryx doesn't provide support for customer Python code.
One Tool Example
This tool has a One Tool Example. Go to Sample Workflows to learn how to access this and many other examples directly in Designer.
Get Started
Use the Python tool Configuration window to input or import your Python script. For code assistance, refer to the additional references at Alteryx Python Functions.
Install the Data-Science Packages You Need
The Python tool includes these data-science packages:
ayx: Alteryx Python API that interacts with workflows and the Designer runtime.ayx_python_sdk: Software development kit (SDK) to build and extend Alteryx tools in Python.numpy: Core package for numerical computing and array processing in Python.pandas: Data structures for data analysis, time series, and tabular processing.scipy: Scientific computing library for optimization, statistics, signal processing, and advanced mathematics.scikit-learn: Machine learning library for classification, regression, clustering, and model evaluation.statsmodels: Statistical modeling and econometrics library for regression and hypothesis testing.pyarrow: High-performance library for columnar data processing and Apache Arrow interoperability (for example, Parquet and IPC).SQLAlchemy: Database abstraction and object-relational mapping (ORM) toolkit for relational databases in Python.pyodbc: ODBC connector for enterprise databases.requests: HTTP library to call APIs and web services.matplotlib: Plotting library for static charts and visualizations.plotly: Visualization library for interactive charts and dashboards.plotly: Visualization library for interactive charts and dashboards.dash: Framework to build analytical web applications in Python.
Additional Package Installation
Depending on which version of Designer you use, you can install additional packages with the function Alteryx.installPackages. For example, to install keras, run this command:
from ayx import Package
Package.installPackages("keras")You can install additional Python packages only if you run Designer as an admin. Non-admin users can't install additional Python packages.
Configure the Tool
You can use the Python tool Configuration window to select your base environment and input your Python script.
Environment
Use the Environment dropdown to select your base environment. The default environment is DesignerBaseTools_vEnv.
Create a Custom Environment
You can also create a custom environment to use in your Python tool. You can specify your dependencies in your custom environment and configure the Python tool to use the environment. This allows you to quickly import packages, and it provides a more efficient, easier-to-manage approach to using the Python tool in Designer.
If you want to use a custom environment, follow these instructions:
Go to this folder (Admin version of Designer):
C:\Program Files\Alteryx\bin\Python\envs\DesignerBaseTools_vEnv\share\jupyter\kernelsCopy the
designerbasetools_venvfolder.Rename the copied folder to the name you want for the new kernel.
In the renamed folder, open
kernel.json.Update the
display_namevalue.Set it to the kernel name you want to show in the Environment menu in the Python tool configuration.
This value usually matches the folder name, but it doesn't need to.
Leave these values unchanged:
argv: Jupyter uses this to run Python for the environment. For testing, don't change it.language: Leave this set topython.
Example
kernel.jsonfile:{ "argv": [ "C:\\Program Files\\Alteryx\\bin\\Python\\envs\\DesignerBaseTools_vEnv\\Scripts\\python.exe", "-m", "ipykernel_launcher", "-f", "{connection_file}" ], "display_name": "MyCustomEnv", "language": "python" }Save
kernel.jsonand return to Designer.Refresh the kernel list:
Click off the Python tool, then select the tool again.
If you don't see the new kernel, close Designer and reopen it.
Use a Different Python Interpreter (Optional)
Important
We recommend uv to manage your custom Python environment.
You can configure your custom environment to use a different Python interpreter. Doing this lets you use a fully separate Python environment with your own installed packages. To use a different Python interpreter in your custom environment, follow these steps:
Open
kernel.jsonin your custom kernel folder.Update the first entry in the
argvlist to point to the file path of your custom environment’s Python executable.Example
kenrel.jsonwith updatedargventry:{ "argv": [ "C:\\Users\\<username>\\alteryx_envs\\myenv\\Scripts\\python.exe", "-m", "ipykernel_launcher", "-f", "{connection_file}" ], "display_name": "MyCustomEnv", "language": "python" }Save the
kernel.jsonfile and refresh the kernel list in Designer.Click off the Python tool, then select the tool again.
If you don't see the new kernel, close Designer and reopen it.
Add AYX Package to Custom Environment
Important
If you are using a custom Python environment, you must ensure the ayx package is available. The ayx package is required for the Python tool to interact with your Designer workflow (for example, read and write data).
To add the ayx package to your custom environment, follow these steps:
Locate the ayx package in the default environment:
C:\Program Files\Alteryx\bin\Python\envs\DesignerBaseTools_vEnv\Lib\site-packages\ayxCopy the entire
ayxfolder.Paste the folder into your custom environment’s
site-packagesdirectory:<your-env>\Lib\site-packages\
The ayx package depends on additional libraries that might not be installed in your custom environment (for example, pandas). Copying the package into your custom environment doesn't automatically install dependencies.
Install any missing dependencies in your custom environment. For example:
pip install pandas
Last, to verify that you’ve successfully installed the ayx package, activate your environment and run this command:
python -c "import ayx; print('ayx installed successfully')"Python Script
Use the Python Script field of the Configuration window to input or paste your Python script. You also have the option to import a script. To do so, select Overwrite Script/Notebook and browse to your script or notebook file. The file must be a .py (Python script) or .ipynb (Python notebook) extension.
Alteryx Python Functions
There are a number of functions available as part of the Alteryx package when you run from ayx import Alteryx. The functions let you pass data between Alteryx and Jupyter.
For available functions, descriptions, and examples, go to Alteryx Python Functions.
Important
The Python tool treats your data as a Pandas DataFrame. For more information, go to pandas.pydata.org.
Connect to Workflow Data
The Python tool accepts multiple inputs. After you connect inputs, you can use the Alteryx.read function to bring your workflow data into the tool as a pandas DataFrame. You can then use Python to transform the data, and finally use Alteryx.write to output data from the Python tool.
Refer to Alteryx Python Functions for a full list of functions available via the Alteryx library.
Notes and Limitations
Pandas String Dtype
The Alteryx Designer Python tool doesn't support the pandas "string" dtype. Instead, we recommend the standard "object" dtype, which allows the DataFrame to be written successfully.
IPython
With the updates to the Python tool in version 2026.1, relying on IPython's interactive features is no longer compatible with the Python tool’s intended functionality in Designer.
IPython functionality primarily supports interactive exploration, which is less relevant in production workflows executed within Designer.
As a result:
Alteryx won't maintain compatibility with IPython-specific features.
Workflows that rely on IPython functionality might no longer behave the same way as they have prior to version 2026.1.
If you require these capabilities, you need to run your code outside of Designer in an IPython environment.
Python Tool Doesn't Load Script with Disable Auto Configure
If you turn on Disable Auto Configure in User Settings, Python tools created before version 26.1 do not load their script content when you open a pre-26.1 workflow in Designer version 2026.1.
To address this issue, turn off Disable Auto Configure in User Settings, then reopen the workflow. This allows the tool to convert and load the script content.
This issue affects only Python tools created before Designer version 2026.1.
The issue doesn't occur when Disable Auto Configure is turned off (default setting).
