Hiding passwords in python file

Viewed 285

I have a Python application that has a file containing several hardcoded databases credentials. I have to find a way to hide these information, because keeping usernames and passwords in the code is insecure. I came across Keyring library which could be an alternative, but it also allows an unauthorized developer to print passwords throw the get_password method. Does anyone have any tips for hiding or encrypting passwords in Python, preventing them from printing?

1 Answers
Related