Answer the question
In order to leave comments, you need to log in
How to compile python so that it can't be decompiled?
How to compile a python script so that its contents cannot be pulled out by a decompiler?
In particular, it is necessary to protect not the code itself, but a small section of it, the password to the database :)
Answer the question
In order to leave comments, you need to log in
If the database is located locally, then it does not make sense. And if to a remote database, then you need to do the right server api. And there is always a possibility to decompile.
If you just hide the password from prying eyes, which is stored in clear text, then you can use base64 encoding:
pass = 'password'
encoded_password = pass.encode('base64')
print encoded_password
decoded_password = encoded_password('base64')
print decoded_password
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question