A desktop password manager built with Python and Tkinter.
This application helps track account credentials across multiple categories, generate secure passwords from a word list, and import/export backup data in JSON, CSV, and XLSX formats.
- Multi-tab credential management:
- Password Book
- Mobile Devices
- Computers
- Admin
- Full CRUD operations (Add, Update, Delete, Search)
- Password generator (word-based + symbol + digits)
- Optional clipboard copy support via
pyperclip - Import and export support:
- Per-category backups
- Full multi-category backups
- Header-only template exports for CSV/XLSX imports
- Password update reminder workflow:
- Tracks
updated_at - Flags records older than 90 days
- Displays due items in a dedicated Reminders tab
- Tracks
- Storage backend auto-selection:
- Uses PostgreSQL when available
- Falls back to local JSON storage when DB connection is unavailable
- Python 3
- Tkinter (GUI)
- PostgreSQL (
psycopg2) for primary storage - JSON file fallback storage
openpyxlfor.xlsximport/exportpython-dotenvfor environment variable loading
password_manager/
├── password_manager.py # Main GUI application
├── password_generator.py # Password generation utilities
├── postgresql.py # PostgreSQL connection helper
├── password_data.json # JSON fallback data store
├── public_config.json # Public word list config
├── word_list.json # Public word list
├── requirements.txt
├── LICENSE.txt
├── README.md
├── json_files/
│ └── word_list.json # Private/local word list option
└── sql_functions/
└── password_manager_table.sql # Example base table DDL
- Create and activate a virtual environment.
python -m venv .venvWindows (PowerShell):
.venv\Scripts\Activate.ps1Windows (cmd):
.venv\Scripts\activate.bat- Install dependencies.
pip install -r requirements.txtCreate a .env file in the project root for PostgreSQL access:
POSTGRESQL_HOST=host
POSTGRESQL_PORT=port
DATABASE=password_manager
POSTGRESQL_USER=username
POSTGRESQL_PASSWORD=your_passwordIf these values are missing or the database is unreachable, the app automatically
uses password_data.json for storage.
Password generation uses a JSON array of words and resolves sources in this order:
json_files/private_config.json->word_list_path(if present)public_config.json->word_list_pathjson_files/word_list.jsonword_list.json
Example public_config.json:
{
"word_list_path": "word_list.json"
}Expected word list format:
["apple", "sunset", "rocket", "bridge"]At least 2 valid words are required.
You can let the app create required tables automatically on startup,
or manually run the SQL in sql_functions/password_manager_table.sql as a baseline.
On startup, the app ensures category tables exist for:
password_managerpassword_manager_mobile_devicespassword_manager_computerspassword_manager_admin
Each table enforces uniqueness on:
employee_nameaccount_nameusername
python password_manager.pyThe UI opens with category tabs and a Reminders tab.
.json.csv.xlsx
employee_name/Employee Nameaccount_name/Account Nameusername/Usernameaccount_password/Password/Account Passwordnotes/Notescategory/Category(required for full multi-category tabular imports)
- Required fields: employee name, account name, username, password
- Duplicate detection key: employee + account + username
- Existing matches are updated (upsert behavior)
- Invalid rows are skipped and reported
- A record is considered due when
updated_atis older than 90 days. - Due records are grouped and shown in the Reminders tab.
- A startup warning summarizes due counts by category.
- Passwords are stored as plain text in this project (database and JSON fallback).
- Use this project only in trusted/internal environments unless you add encryption and stronger access controls.
- Do not commit real credentials or private
.envvalues.
psycopg2install issues on Windows:- Ensure Python and pip are up to date.
- If build errors occur, install PostgreSQL client tools and Visual C++ Build Tools, or use a compatible wheel.
.xlsximport/export errors:- Verify
openpyxlis installed.
- Verify
- Password generator errors:
- Confirm the configured word list file exists and is a JSON array of strings.
This project is licensed under the MIT License. See LICENSE.txt.