Do not let user have access to data of a script

Posted on

Question :

I have a script that was generated in python and calls functions in R .

At first it was developed for internal use, but now they are planning on releasing it for customer use. But they do not want users to have access to the calculations they use.

I wish the user did not have access to the data.

Script is used within the QGIS platform.


Answer :

Python is an interpreted language, so it is very difficult to block access to the source code. Even if you use a exe converter like py2exe , the executable layout is known as it is only compressed in a zip.

Usually, in cases like this, you have to make a choice. How important is it to protect the code? Are there any real secrets there (as a key to symmetric encryption of bank transfers), or are you just being paranoid? Choose the language that allows you to develop the best, fastest and most realistic product on how important your innovative ideas are.

If you decide that you really need to protect the script, write it as a small C extension, however I do not know if this would apply to the QGis platform. If it were possible for it to call an executable you would have already considered the first suggestion I left in the comments regarding SuperCrypt , or even to use a compiled language.


Translated and adapted from another issue of the English SO.


Leave a Reply

Your email address will not be published. Required fields are marked *