[Tutor] managing sensitive data

Alex Kleider alexkleider at gmail.com
Tue Mar 30 11:37:09 EDT 2021


I saw the following question raised recently on the "PowerfulPython"
mailing list
 "How do I manage sensitive credentials in my Python code?"
(One has to sign up for a course to hear the discussion.)
I've faced this problem [1] and solved it by putting the 'sensitive' data
(passwords) into dot files in my home directory with strict permission
settings. I've not tested it but assume that the code will fail when trying
to read such a file if the one running the code doesn't have permission to
read it. (Not really a 'Python' solution!)
Is there a better way to do this?

[1] my code sends out emails and to do this needs a password to convince
the mail transfer agent to accept the mail.


More information about the Tutor mailing list