A clean and simple Python tool to generate a strong password, copy it to the clipboard, and optionally save it with a custom label.
- Prompts the user for a password length between 8 and 20 characters.
- Uses Python's secure
secretsmodule to generate random characters. - Builds a password from lowercase letters, uppercase letters, digits, and symbols.
- Prints the generated password on the screen.
- Copies the password automatically to the clipboard using
pyperclip. - If the user chooses to save, asks for a name and appends the password to
Password.txt.
- Python 3.x
pypercliplibrary
Install the required package with:
pip install pyperclipRun the program from the project folder:
python password_genartor.pyThen follow the prompts:
- Enter the desired password length (
8to20). - The program generates a secure password.
- The password is printed and copied to the clipboard.
- When asked, type
yto save the password. - If saving, enter a name for the password and it will be appended to
Password.txt.
- If you enter a number outside the allowed range, the program will ask again until a valid number is entered.
- The password may include special symbols, so make sure your destination supports them.
- When saved, each password is added to
Password.txtwith the label you provide.
Thank you for using this password generator! 🚀