Agisoft Metashape

Agisoft Metashape => Python and Java API => Topic started by: dwieka on April 04, 2022, 07:01:02 AM

Title: Is it possible to encrypt our python code using locale module in Metashape?
Post by: dwieka on April 04, 2022, 07:01:02 AM
Hello Everyone!
I'm just wondering is it possible for us to encrpyt our python code using locale module in Metashape environment? Right now I'm developing some script and it will be used by a lot of people, and I want to encrypt those code so the user cannot read the raw file.
Thank You!  :D
Title: Re: Is it possible to encrypt our python code using locale module in Metashape?
Post by: Alexey Pasumansky on April 04, 2022, 01:46:58 PM
Hello dwieka,


The question seems to be quite general for Python scripts, as it is not related to Metashape module itself.
​There could be several ways of solution, although they are not ideal.The main option is script obfuscation, see related links below:
 http://pyob.oxyry.com/
 https://github.com/astrand/pyobfuscate
 http://www.bitboost.com/

Another way is creating an executable from the code and all required dependencies, such option can be based on stand-alone Metashape Python module:
https://stackoverflow.com/questions/5458048/how-can-i-make-a-python-script-standalone-executable-to-run-without-any-dependen