Make arcpy.EncryptPYT() and arcpy.DecryptPYT() work with atbx toolboxes

412
1
06-07-2023 05:04 PM
Status: Open
DuncanHornby
MVP Notable Contributor

I have been working on a large conversion of an ArcMap AddIn into a python atbx toolbox. So far so good. I know when looking at the tool property I can encrypt the tool to protect the source code by clicking on this button:

DuncanHornby_0-1686182216136.png

But my atbx Toolbox has many tools so I was looking at arcpy.EncryptPYT() as a way of automating the encryption of the tools in the toolbox. This does not work, I assume its for a pyt tool but there appears to be no equivalence for atbx toolboxes.  Either expand the capability of arcpy.EncryptPYT() and arcpy.DecryptPYT() to work with atbx toolboxes or add new functions to arcpy that can encrypt python tools in an atbx toolbox.  For the record all my python is embedded in the atbx for convenience and I will have to manually go through all tools setting the encryption password, a less than ideal situation.

1 Comment
DuncanHornby

Anyone from the geoprocessing\python esri team have a solution to this? If you have a toolbox  (atbx) with dozens of embedded scripts how to do you en masse encrypt all scripts?  I'm regularly hitting this problem and in need of a solution.