YXI Packaging and Installation
A modified process for packaging and installing Python tools is available to accommodate Python virtual environments and third-party library dependencies.
If your Python tool does not use a virtual environment or third-party libraries, complete the process outlined in Package a Tool.
If your tool uses a virtual environment or third-party libraries, complete the following steps to package your tool and its dependencies.
- Verify that you have setup a Python Virtual Environment and Dependencies.
- Create a list of the third-party dependencies that are installed with the tool.
- Run a pip freeze command from the Python virtual environment's \Scripts path.
- Verify that the resulting text file only contains libraries that are used in the tool.
- Create a temporary working folder.
- Copy all files that will be included in the YXI file, including the requirements file, into the temporary folder.
- pyvenv.cfg
- pip-selfcheck.json
- \include
- \Lib
- \Scripts
- Copy the ToolNameConfig.xml file from the tool sub folder to the root of the temporary tool directory.
- Rename ToolNameConfig.xml to Config.xml, and open the file.
- Verify that the file is configured correctly and that all quotes are removed from the elements.
- Compress the contents of the temporary working folder into a zip file.
- Rename the .zip file to a .yxi file.
- Verify the conversion by double-clicking on the yxi file. Designer should show a tool installer window for your tool.
C:\ProgramData\Alteryx\Tools\ExamplePythonSDKTool\Scripts>pip
freeze > ..\requirements.txt
C:\temp\ExamplePythonSDKTool
Copy exclusions
Do not copy any virtual environment files or folders, including:
<Properties>
<MetaInfo>
<Icon></Icon>
<ToolVersion></ToolVersion>
<Author></Author>
<Name></Name>
<CategoryName></CategoryName>
<Description></Description>
<SearchTags></SearchTags>
</MetaInfo>
</Properties>
Build your own tool checklist
|
Create a folder with the name of your tool. See Build Custom Tools. |
|
Create icon and save it inside the tool folder. See Build Custom Tools. |
|
Create a GUI file and save it inside the folder. See HTML GUI SDK. |
|
Create your back end and save it inside the folder. See C++ SDK, Macro, and Python SDK. |
|
Create a configuration file and save it inside the folder. See Tool Configuration File. |
|
Create a package configuration file and save it with the folder. Package a Tool. |
|
Package the package configuration file and tool folder as a yxi. See Package a Tool. |