Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

🔐 Password Generator (Python)

A secure and customizable strong password generator script built in Python. Generate high-quality passwords with options for length, character types, and readability.


📋 Table of Contents

  1. Overview
  2. Features
  3. Requirements
  4. Installation
  5. Usage
  6. Code Structure
  7. Security Notes
  8. Contributing
  9. License

💡 Overview

This Python script lets users quickly generate random, secure passwords via CLI. It’s customizable and ideal for both personal use and integration into larger automation workflows.


✅ Features

  • Customizable length (default: 16 characters)
  • Mix of uppercase, lowercase, digits, and symbols
  • Option to exlude similar-looking characters (e.g., O, 0, l, 1)
  • Choice to avoid ambiguous symbols for better readability
  • Easily embeddable as a function or module in other Python projects

🧾 Requirements

  • Python 3.7+
  • No external dependencies—just the Python standard library

⚙️ Installation

git clone https://github.com/MisaghMomeniB/Password-Generator-Python.git
cd Password-Generator-Python
python3 --version  # ensure Python ≥3.7

🚀 Usage

CLI Example

Run the script directly with customizable options:

python3 password_generator.py --length 20 --no-ambiguous --no-similar

Options:

  • --length <int>: Set password length (default 16)
  • --no-ambiguous: Exclude punctuation that’s hard to read
  • --no-similar: Skip characters like 0, O, l, 1
  • --count <int>: Generate multiple passwords in one run

As a Python Module

Import generate_password() in your code:

from password_generator import generate_password

pwd = generate_password(length=24, no_ambiguous=True)
print("Generated password:", pwd)

📁 Code Structure

/ (root)
├── password_generator.py   # CLI script & core logic
└── README.md               # This file
  • generate_password(): main function with customizable options
  • if __name__ == "__main__": block handles CLI parsing via argparse

🔒 Security Notes

  • Uses secrets.SystemRandom() for cryptographic-quality randomness
  • Ensures a mix of character types by design
  • Avoids insecure random module

🤝 Contributing

Improvements welcome! Suggested enhancements:

  • Add pronounceable password mode
  • Integrate password strength estimation
  • GUI or web-based interface

To contribute:

  1. Fork the repository
  2. Create a new branch (feature/...)
  3. Submit a detailed pull request

📄 License

About

A Python-based Password Generator That Creates Secure and Random Passwords for Enhanced Online Security. Customizable for Different Length and Complexity Requirements, Ensuring Robust Protection for Your Accounts.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages