0

I am writing a script that sends emails using the smtplib. I want to store the username and password so that the user doesn't have to enter it every time and I've found many posts about it, but none to the point. I don't think I need a database to store one username and password (encrypted), but I don't know where to go to. I was skimming through passlib's documentation, but it seems to return only boolean values and I'd need the password and username. Any ideas on how to store them?

1
  • 1
    In what context is this being used? Who would be entering the password where and how? Commented Aug 3, 2015 at 13:03

1 Answer 1

1

I don't know the circumstances but for now I can recommend keyring

The Python keyring lib provides a easy way to access the system keyring service from python. It can be used in any application that needs safe password storage.

You have to set the credentials once in the user account. The user gets access to the password. It's always best practice to have a service user. You will reach the operating systems level of security.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.