Skip to content

Latest commit

 

History

History
83 lines (71 loc) · 3.02 KB

File metadata and controls

83 lines (71 loc) · 3.02 KB

Project Structure

This document explains the purpose of every file in the Random Password Generator project.

Password_Generator_Project/
├── main.py
├── README.md
├── LICENSE
├── .gitignore
├── PROJECT_STRUCTURE.md
└── screenshots/
    ├── home.png
    ├── generate-password.png
    ├── multiple-passwords.png
    ├── change-length.png
    ├── current-settings.png
    ├── reset-settings.png
    ├── invalid-input.png
    ├── invalid-length.png
    └── exit.png

File Descriptions

main.py

The complete source code for the application. It is a menu-driven console program built entirely with the Python Standard Library (string and secrets). It contains:

  • Configuration constants — default, minimum, and maximum password lengths, and the character pool (letters + digits).
  • Input validation functionsget_valid_length() and get_valid_count(), which reject empty, non-numeric, zero, and negative input without ever crashing the program.
  • Core generation logicgenerate_password() and generate_multiple_passwords(), which use secrets.choice() for cryptographically secure randomness and ''.join() for efficient string building.
  • Menu action handlers — one function per menu option (generate, change length, generate multiple, view settings, reset settings).
  • Menu display and input loopdisplay_menu(), get_menu_choice(), and main(), which tie everything together into a continuously running application until the user exits.

README.md

The GitHub-facing project documentation: description, features, tech stack, installation and run instructions, program flow, example output, embedded screenshots, learning outcomes, and author details.

LICENSE

The MIT License, permitting free use, modification, and distribution of this project with attribution.

.gitignore

Standard Python ignore rules so that bytecode caches, virtual environments, IDE settings, and OS-specific files are never committed to the repository.

PROJECT_STRUCTURE.md

This file — a guide to what each part of the project is and why it exists.

screenshots/

Real terminal screenshots captured from actual runs of main.py, covering the home screen, each menu action, and both invalid-input and invalid-length validation messages. Referenced directly in README.md.

Design Notes

  • No external dependencies. Only string and secrets from the Python Standard Library are used.
  • No persistent storage. Passwords and settings exist only in memory for the duration of a single run; nothing is written to disk.
  • No classes. The application is implemented with functions, loops, conditionals, and clear variable names, consistent with the Core Python scope of this assignment.
  • Graceful error handling. All numeric input is validated before use, and KeyboardInterrupt/EOFError are caught at the top level so the program always exits cleanly instead of crashing.