A while ago I decided to build a password generator just to practice some Python. I fired up the editor, put together a script with the random module, and it worked great: if you give it a length, it spits out a string of characters.
Later, I found out that using random for anything that needs to be secure is a really bad idea. So, in this tutorial I’m going to show you why that module is unsuitable for security, and how to make a proper secure password generator with the secrets module instead.
So, this isn’t just another “here’s a password generator” tutorial.…