Saving description of Tool parameters without sharing the xml

476
6
02-13-2020 04:03 AM
SarthakBhatia1
New Contributor II

I have created a Python Toolbox with multiple tools. Each of these tools takes multiple parameter inputs. Using the "Item Description" option from Arc Catalog, I have added multiple descriptions. This toolbox is further being shared with a user. Now I have the option of encrypting the python toolbox but not the XML files which are created in the directory containing the Python Toolbox, so I can share the toolbox but not the XML Files as the entire code has to be encrypted to ensure the user does not make any unwanted changes.

The issue this creates is that the description I have added are not shared as they are stored in the XML File. Is there any way I can store the descriptions directly in the Python Toolbox? 

0 Kudos
6 Replies
DanPatterson_Retired
MVP Esteemed Contributor

With a conventional toolbox (aka custom tool), all the parameter descriptions are stored within the *.tbx.  The xml portion doesn't contain the sometimes verbose parameter descriptions and help information

0 Kudos
SarthakBhatia1
New Contributor II

Hi,

I have mentioned in my question that I need to encrypt the toolbox which is why a python toolbox is being used and not a conventional toolbox.

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

Additional security

From 

Comparing custom and Python toolboxes—Geoprocessing and Python | Documentation 

it is pretty hard to pull out the code once it is embedded into a toolbox

Custom toolboxesPython toolboxes

Script tools in a custom toolbox can have their source code embedded into the toolbox and secured with a password.

A Python toolbox .pyt file can be encrypted in place and secured with a password.

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

here is a toolbox with an embedded script, give a look and see if it is secure enough for you

0 Kudos
SarthakBhatia1
New Contributor II

Hi Dan,

I know how this works but this actually does not satisfy my requirement. There are certain requirements why I have chosen to operate using a .pyt and not a .tbx.

What I need to know is that if there isn't any way we can add the description to the .pyt itself, is there a way we can embed the XML files in it or is there a way we can encrypt those files directly.

Thank You. 

0 Kudos
DanPatterson_Retired
MVP Esteemed Contributor

short of placing the information in script docstrings or even the xml itself within a script and encrypting it, there is nothing out of the box that I can see.  On the downside python encryption/decryption is pretty easy to break.  A solid license statement if you are worried about commercial value.

Good luck