We have developed a script that generates certain reports as output. Input data being confidential in nature, one of our clients wants the code to be hosted in their country and also for the business continuity have access to the source code with a caveat to never re-use or sell it further.

I would like to know is there any process or technique say like a password or encrypted key that can be used within the code to prevent any unauthorized use of source code without us generating those keys to be inserted in the code.

We use python/flask on linux for our development purpose.

  • That's DRM, and that doesn't work
    – user163495
    Commented Dec 19, 2020 at 20:55

1 Answer 1


No there isn't

Atleast, there is no foolproof way. If you give them the code, they can do whatever they like with it. If you attempt to include some checks in the code that prevent anybody else from using it without having a password/key/etc, with enough effort, the check can be removed from the code by anyone copying it.

  • This is correct. You should factor this into your risk, pricing and legal models. Commented Dec 20, 2020 at 10:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .