Add PyPassword Generator project with source code, tests, and
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Successful in 7s

documentation
This commit is contained in:
2026-10-04 11:16:42 +08:00
commit 129fd80c67
13 changed files with 673 additions and 0 deletions
+94
View File
@@ -0,0 +1,94 @@
# 🚀 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](#-overview)
- [Requirements](#-requirements)
- [Setup](#-setup)
- [Run](#-run)
- [Tests](#-tests)
- [License](#-license)
- [Links](#-links)
## 🧭 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.
![PyPassword Generator running in a terminal](docs/images/screenshot.png)
## 📋 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):
```powershell
python -m venv .venv
.\.venv\Scripts\Activate.ps1
```
Windows (cmd):
```bat
python -m venv .venv
.venv\Scripts\activate.bat
```
macOS / Linux / Git Bash:
```bash
python3 -m venv .venv
source .venv/bin/activate # Git Bash on Windows: source .venv/Scripts/activate
```
Then install:
```bash
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.
## ▶️ Run
```bash
python -m password_generator
```
or, after installing:
```bash
password-generator
```
## 🧪 Tests
```bash
python -m pytest
```
## 📄 License
GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later).
## 🔗 Links
- [Repository](https://git.tirsystem.com/Tirsvad-Udemy-100_days_of_code/005-py_password_generator)
- [Documentation](https://git.tirsystem.com/Tirsvad-Udemy-100_days_of_code/005-py_password_generator#readme)
- [Issue tracker](https://git.tirsystem.com/Tirsvad-Udemy-100_days_of_code/005-py_password_generator/issues)