title: Python's safest method to store and retrieve passwords from a database
body: <p>Looking to store usernames and passwords in a database, and am wondering what the safest way to do so is.  I know I have to use a salt somewhere, but am not sure how to generate it securely or how to apply it to encrypt the password.  Some sample Python code would be greatly appreciated.  Thanks.</p>