Python Forum
Secure deploy the code without providing the implementation - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: Code sharing (https://python-forum.io/forum-5.html)
+--- Thread: Secure deploy the code without providing the implementation (/thread-37185.html)



Secure deploy the code without providing the implementation - mikepy - May-09-2022

Hi fellows, how can I deploy my own library created in Python on Windows or Linux without providing the source code. The reason is that I want to use it in future as production code. So in my case I would only like to provide the function or method delarations and not the implementation. How can I achieve this security deployment? I know that there is a pyc file which encrypts the code, but I have read that it is possible with some expense to dencrypt it. That is not what I need.


RE: Secure deploy the code without providing the implementation - Skaperen - Aug-05-2022

if something is to run something that is encrypted, there has to be a way to decrypt it. if someone is dedicated to the task (money often achieves this), any code in any form that is runnable can be reversed it some form of source code. there are many decompilers out there for compiled languages. if it possible to run it, it is possible to see all the steps in it, making it possible to reconstruct it in nearly every language. imagine your implementation goes back to source as Perl.

pyc files are not really encrypted. they are just in a form that is easy for computers to interpret which is harder for humans to interpret.