Skip to main content

A lightweight password generator with a PySide6 GUI and CLI.

Project description

Password Generator App

A clean and lightweight password generator built with PySide6 and Python.
The project provides both a graphical user interface and a command-line interface.

Features

  • Simple Material-style GUI
  • Dark and light themes
  • Accent color selection
  • Password generation with configurable character groups
  • Clipboard copy
  • Persistent local settings stored beside the project
  • CLI support for terminal-based use
  • Small, readable UI with responsive spacing

Screenshots

CLI

CLI screenshot

GUI

GUI screenshot

Installation

From source

pip install -r requirements.txt
pip install -e .

From PyPI

pip install password-generator-app

Run the application

The main command is passgen.
The alias password-generator is also available after installation.

From a local source checkout without installation

$env:PYTHONPATH = "src"
python -m password_generator_app.cli gui
python -m password_generator_app.cli --length 32 --copy

After installation

passgen gui
passgen --length 32 --copy
password-generator gui
password-generator --length 32 --copy

Direct module execution

python -m password_generator_app.cli gui
python -m password_generator_app.cli --length 32 --copy

GUI usage

Launch the graphical interface:

passgen gui

Or:

password-generator gui

The GUI allows you to:

  • Generate secure passwords visually
  • Configure character groups
  • Set minimum character counts
  • Switch between dark and light themes
  • Customize accent colors
  • Copy passwords directly to the clipboard

CLI usage

Generate a password with default settings:

passgen

Generate a password with a custom length and copy it to the clipboard:

passgen --length 32 --copy

Show help:

passgen -h

The same CLI commands can also be executed with:

password-generator

CLI options

  • --length, -l — password length
  • --lowercase / --no-lowercase
  • --uppercase / --no-uppercase
  • --digits / --no-digits
  • --punctuation / --no-punctuation
  • --min-lowercase
  • --min-uppercase
  • --min-digits
  • --min-punctuation
  • --copy, -c — copy the generated password to the clipboard

Python API

You can also use the generator directly from Python code:

from password_generator_app.core.password_generator import (
    PasswordGenerator,
    PasswordConfig,
)

config = PasswordConfig(
    length=18,
    include_lowercase=True,
    include_uppercase=True,
    include_digits=True,
    include_punctuation=True,
    min_lowercase=3,
    min_uppercase=3,
    min_digits=3,
    min_punctuation=3,
)

password = PasswordGenerator(config)

for _ in range(5):
    print(password.generate())

Settings

The application stores its settings in the project directory as settings.json.

Saved values include:

  • theme
  • accent color
  • window size
  • password generation options

Project Structure

password_generator_app_v1/
├── imgs/
├── scripts/
│   ├── cleanup.ps1
│   ├── build.ps1
│   ├── rebuild.ps1
│   └── rebuild.bat
├── src/
│   └── password_generator_app/
├── tests/
├── CHANGELOG.md
├── LICENSE
├── MANIFEST.in
├── pyproject.toml
└── README.md

Windows Batch Launcher

You can place passgen.bat inside your commands folder and update the project path in the file.
After that, the app can be launched directly from the terminal without installing the package.

passgen gui
passgen --length 32 --copy
password-generator gui
password-generator --length 32 --copy

Running Tests

Install pytest:

pip install pytest

Run all tests:

pytest -v

The project includes:

  • Core password generator tests
  • Validation tests
  • CLI tests

Development Utilities

Rebuild local package

Run the complete local development workflow:

powershell -ExecutionPolicy Bypass -File .\scripts\rebuild.ps1

Or:

.\scripts\rebuild.bat

This process will:

  • Clean the project
  • Remove old local installations
  • Run tests
  • Build package distributions
  • Validate distributions using Twine
  • Reinstall the latest local build

Author

Developed by Vahed MamGhaderi

License

This project is licensed under the MIT License.

See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

password_generator_app-1.0.0.tar.gz (872.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

password_generator_app-1.0.0-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file password_generator_app-1.0.0.tar.gz.

File metadata

  • Download URL: password_generator_app-1.0.0.tar.gz
  • Upload date:
  • Size: 872.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for password_generator_app-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c8b2c64e24ce30dd3fc9876723bbf59b8b2b0a5e300b5574e02e8a4d48cd845e
MD5 96aba64d4a6d196d28fe2b923d6a626c
BLAKE2b-256 2d5c845cd328c2da9f292a1f4980e5da19baf32bfded0e805e68baff4806d173

See more details on using hashes here.

File details

Details for the file password_generator_app-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for password_generator_app-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7308858b1254e30231fc0e95ab5f77f0e2a60f8c8c3e90f96cd2b99820583ddd
MD5 aa17413a7adedfcb5da25cda77859529
BLAKE2b-256 a68db374b892d902c5aa12bf8c122dc83e623470d14707e3463deaecdfa8e629

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page