Tirsvad 71f93bb695
TirSystem/git-workflows: Release / release (push) Skipped
TirSystem/git-workflows: Sync GitHub mirror metadata / sync-metadata (push) Successful in 39s
TirSystem/git-workflows: Publish wiki / publish-wiki (push) Successful in 1m16s
TirSystem/git-workflows: Publish accepted milestones / publish (push) Successful in 48s
TirSystem/git-workflows: Validate / validate (push) Successful in 1m1s
TirSystem/git-workflows: OpenGrep / opengrep (push) Successful in 3m57s
Merge pull request 'Baseline the existing program (MIL-001)' (#1) from chore/mil-001-baseline into main
Reviewed-on: #1
2026-11-15 09:25:17 +01:00

🚀 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/.

PyPassword Generator running in a terminal

📋 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).

📎 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

S
Description
PyPassword Generator: build a random password from chosen numbers of letters, symbols and digits - Day 5 of Udemy 100 Days of Code (Python)
Readme AGPL-3.0
146 KiB
0 Stars 1 Watchers 0 Forks
Languages
Python 100%