Skip to content

Sheikh-H/Python-Password-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Python Password Generator CLI

A secure, offline command-line password management application built with Python.
Designed for memorable password generation, local credential storage, and simple password lifecycle management.


πŸ“˜ Project Overview

Python Password Generator CLI is a terminal-based password management application developed using Python. The project focuses on generating memorable yet complex passwords while providing users with a simple local system for managing stored credentials.

The application allows users to create secure passwords from three personally chosen memorable words. These words are combined through different ordering patterns and enhanced with random numbers, special characters, and application-specific identifiers to create unique password variations.

Unlike cloud-based password managers, this project follows a fully local-first approach. All generated credentials are stored inside a local JSON file, meaning no user information is transmitted externally. The system was intentionally designed to reinforce understanding of file handling, JSON persistence, data manipulation, and command-line application structure.

The application provides complete password lifecycle management, allowing users to generate, view, update, and delete stored credentials directly from the terminal.


🧠 Design Philosophy & Learning Objectives

This project was created to explore practical concepts involved in building a small-scale credential management system.

The main learning objectives included:

  • JSON Persistence: Understanding how Python applications store, retrieve, and modify structured data using JSON files.
  • File Management: Learning how applications maintain local state across multiple executions.
  • Password Generation Logic: Creating algorithms that combine user input with randomised values to produce unique outputs.
  • CRUD Operations: Implementing create, read, update, and delete functionality for stored records.
  • CLI Application Design: Building an interactive terminal workflow using menus and user prompts.

⚑ Features

  • Generate secure passwords using three memorable words.
  • Create up to 480 unique password combinations from a single set of words.
  • Automatically include:
    • Random numerical values.
    • Special characters.
    • Application or website names.
  • Store credentials locally using JSON persistence.
  • View all saved passwords in a readable format.
  • Update existing password records.
  • Delete unwanted credentials.
  • Change memorable words to generate new password combinations.
  • Operate completely offline.

πŸ”„ Application Workflow

User Input
    |
    ↓
Three Memorable Words
    |
    ↓
Combination Generator
    |
    ↓
Random Number + Symbol
    |
    ↓
Generated Password
    |
    ↓
JSON Storage

The application follows a simple workflow:

  1. User provides three memorable words.
  2. The program generates multiple word arrangements.
  3. Additional random characters are added.
  4. The generated password is linked to an application or website.
  5. The final record is stored locally.

πŸ“ Folder Structure

Python-Password-Generator/

β”‚
β”œβ”€β”€ password_generator.py     # Main CLI application logic
β”œβ”€β”€ passwords.json            # Local credential storage file
β”œβ”€β”€ Preview.png               # Application screenshot
β”œβ”€β”€ README.md                 # Project documentation
└── LICENSE                   # MIT License

βš™οΈ Installation & Setup

  1. Ensure Python 3.13 is installed on your system.
  2. Clone the repository:
    git clone https://github.com/Sheikh-H/Password-Generator.git
    
  3. Navigate into the project directory:
    cd Password-Generator
    
  4. Run the application:
    python password_generator.py
    
  5. Follow the terminal prompts to configure your memorable words and begin managing passwords.

πŸ–₯️ Command Menu

When launched, the application provides an interactive menu system:

1. Generate Password
2. View All Passwords
3. Change Memorable Words
4. Update Password
5. Delete Password
6. Exit

πŸ” Password Generation System

The password generation algorithm combines multiple data sources to create memorable but complex passwords.

Each generated password contains:

  • Three user-defined memorable words.
  • A random number between 0-9.
  • A randomly selected special character:
    !, @, #, $, %, ^, &, *
    
  • The target application or website name.

Example

Application:
Twitter

Username:
user@example.com

Notes:
Personal account

Generated Password:
AppleSkyRiver4@Twitter

πŸ’Ύ Data Storage Architecture

All password information is stored locally inside passwords.json.

Example structure:

[
 {
   "application": "Twitter",
   "username": "user@example.com",
   "password": "AppleSkyRiver4@Twitter",
   "notes": "Personal account"
 }
]

The application loads this data when required, modifies the in-memory structure, and saves the updated information back into the JSON file.


βš™οΈ Core Application Components

πŸ”‘ Password Generator Engine

Responsible for:

  • Generating word combinations.
  • Adding random characters.
  • Creating unique password variations.

πŸ’Ύ JSON Storage Manager

Handles:

  • Creating the storage file.
  • Reading saved credentials.
  • Writing updated records.
  • Maintaining stored information.

πŸ–₯️ CLI Interface

Provides:

  • Interactive menu navigation.
  • User prompts.
  • Password management controls.
  • Error handling.

πŸ§ͺ Security Considerations

This project is designed as a learning application and should not be considered a production password manager.

Current limitations:

  • Passwords are stored as plain text.
  • No encryption layer is currently implemented.
  • No master password authentication exists.
  • No secure key management system is included.

Future versions could introduce encryption and stronger security mechanisms.


πŸš€ Future Improvements

  • Add encryption for stored credentials.
  • Implement unique IDs for easier password management.
  • Add password strength scoring.
  • Create secure master password authentication.
  • Build a graphical user interface.
  • Add automatic password copying to clipboard.
  • Introduce SQLite database storage.

🧰 Requirements & Dependencies

  • Python Runtime: Python 3.13
  • Standard Libraries Used: json, random, itertools, os
  • External Dependencies: None

πŸ“Έ Application Preview

Application Preview


πŸ“„ Licence

This project is licensed under the MIT Licence β€” see the LICENCE file for details.

MIT Licence

Copyright (c) 2026 Sheikh Hussain

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Footnote

πŸ—£οΈ Feel free to follow, connect, and chat!

GitHub LinkedIn Gmail Portfolio

⭐ If you like this project, please give it a star on GitHub!


⭐ If you like this project, please give it a star on GitHub!

About

Python password generator that creates strong, random passwords while reinforcing security concepts and input handling.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages