How to prevent users from viewing the source code of a Python add-in downloaded from the Autodesk App Store?

How to prevent users from viewing the source code of a Python add-in downloaded from the Autodesk App Store?

p_krola
Enthusiast Enthusiast
603 Views
1 Reply
Message 1 of 2

How to prevent users from viewing the source code of a Python add-in downloaded from the Autodesk App Store?

p_krola
Enthusiast
Enthusiast

Hey everyone,

 

I have a question regarding securing an add-in written in Python for my application downloaded from the Autodesk Store. I would like to prevent users from viewing the source code of the add-on to protect my data and intellectual property. Are there any proven methods that can prevent users from accessing the source code of the add-in?

 

Thanks for any suggestions and tips.

 

p_krola_0-1715333829944.png

 

0 Likes
604 Views
1 Reply
Reply (1)
Message 2 of 2

j4n.vokurka
Advocate
Advocate

Hello,

.py files can be compiled into .pyc files which are not readable to humans. This byte code is then translated in real time into binaries by interpreter on user's pc when the add-in is run. 

If you want to protect your intellectual property, I believe this is not a completely safe option while I know of several tools that can decompile this byte code at least partially back into .py format up to version 3.8. However for the latest 3.9 version of python interpreter, which Fusion uses, there seems to be no functioning solution yet because that version was a major step up that brought many optimizations. See discussion.

So theoretically, for the time being, this solution is a way to go. There aren't many people that know how to use these tools anyway. To avoid this problem I myself use C++ which is compiled straight into binary format which is not decompilable. I found a thread here where @JeromeBriot posted a sample on how to use pyc. files in Fusion.

Good luck
 

0 Likes