Reviewed-on: #1
🚀 PyPassword Generator
A beginner-friendly Python program that generates a password from the number of letters, symbols and numbers you ask for.
📚 Table of Contents
🧭 Overview
Day 5 of Udemy's 100 Days of Code™: The Complete Python Pro Bootcamp, practising loops and the random module.
The program starts with a colored ASCII-art title (colors are skipped when the output is not a terminal or the NO_COLOR environment variable is set). It then asks how many letters, symbols and numbers you want and prints two passwords:
- Easy level – characters are appended in order: letters, then symbols, then numbers.
- Hard level – the characters are collected in a list and mixed with
random.shuffle()so the order is completely random.
The repository holds the program in src/password_generator/, its tests in tests/ and the project documents in docs/.
📋 Requirements
- Python 3.13 or newer
- No runtime dependencies (the standard library is enough)
pytest(only for running the tests)
🛠️ Setup
Create and activate a local virtual environment named .venv, then install the project in editable mode together with the test extra.
Windows (PowerShell):
python -m venv .venv
.\.venv\Scripts\Activate.ps1
Windows (cmd):
python -m venv .venv
.venv\Scripts\activate.bat
macOS / Linux / Git Bash:
python3 -m venv .venv
source .venv/bin/activate # Git Bash on Windows: source .venv/Scripts/activate
Then install:
python -m pip install --upgrade pip
python -m pip install -e ".[test]"
Run deactivate to leave the environment.
The .env file (access tokens for repository tooling) is ignored by git and is not needed to run the program. Copy .env.example to .env only if you use that tooling.
▶️ Run
python -m password_generator
or, after installing:
password-generator
🧪 Tests
python -m pytest
📄 License
GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).
🔗 Links
📎 Appendix: Project documents
The documents a newcomer needs, in reading order. Drop a line only when the project has no such document yet.
| Document | What it tells you |
|---|---|
| Business Case | Why the project exists, its scope and success criteria |
| Stakeholder Analysis | Who is involved; the stakeholder IDs used for owners and reviewers |
| Project Plan | The gateways and their schedule |
| Milestones | One document per gateway: Go/No-Go criteria and tasks |
| Artifact registry | Where each artifact type lives, the next version, the PO language and domain |
| Traceability matrix | How the artifacts link and when each was last reviewed |
