Skip to content

nanaelie/psmgr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PyPI Downloads Python GitHub release (latest by date) PyPI version License Issues Last Commit Stars Forks Code Style Tests Maintained PRs Welcome SQLite CLI Tool Open Source DB Secure Security Encryption Data Privacy Donate

Please, don't forget to star ⭐ the repo and share it with others!

Password Manager in Python

This is a Python-based password manager that helps you securely store and manage your passwords. With features like password generation, account storage, retrieval, updating, and deletion, this tool is perfect for individuals looking to manage their passwords securely and efficiently.

Key Features:

  • Generate Strong Passwords: Automatically generate strong, secure passwords of customizable lengths.
  • Store Accounts: Add new accounts and their corresponding passwords securely to the database.
  • Retrieve Accounts: Get the saved information of a specific account when needed.
  • Update Account Details: Update the password for an existing account.
  • Remove Accounts: Delete accounts you no longer need from the database.
  • Display All Accounts: View all stored accounts and their passwords. Here are the instructions you can provide to others for installing and using your psmgr project:

Installation

To install psmgr, run this command below:

pip install psmgr

Usage

Once installed, you can use psmgr directly from the command line.

Global

$ psmgr --help    
usage: psmgr [-h] [--remove RM_ACCOUNT] [--generate GENERATE] [--get GET_ACCOUNT] [--update UPDATE_ACCOUNT] [-v]
             {add-account,display-accounts} ...

Password manager allowing to: 
- Generate a strong password (length ≥ 12) 
- Save a password for an account 
- Retrieve account information 
- Delete an account - Update an account's password

positional arguments:
  {add-account,display-accounts}
    add-account         Add a new account
    display-accounts    Display all accounts information

options:
  -h, --help            show this help message and exit
  --remove RM_ACCOUNT, --rm RM_ACCOUNT
                        Remove account by ID
  --generate GENERATE   Generate a new password
  --get GET_ACCOUNT     Get information of an account
  --update UPDATE_ACCOUNT
                        Update an account's information
  -v, --version         show program's version number and exit

Add a new account:

Global usage

$ psmgr add-account --help
usage: psmgr add-account [-h] --ptf PLATFORM --uname USERNAME --pswd PASSWORD

options:
  -h, --help        show this help message and exit
  --ptf PLATFORM    Platform name for the new account (ex: Facebook, Instagram)
  --uname USERNAME  Username for the new account
  --pswd PASSWORD   Password for the new account

Params explanations

  • --ptf PLATFORM → Platform name (e.g., Facebook, Instagram)
  • --uname USERNAME → Username used on the platform
  • --pswd PASSWORD → Password of the account
Example
psmgr add-account --ptf Github --uname my_github_username --pswd my_password

To add my GitHub account where my username is my_github_username and my password is my_password to the database.

⚠️ Username and password must not be empty and should not contain spaces.

Generate a password:

To generate a new password of a specified length:

psmgr --generate 16

⛔ Passwords must be at least 12 characters long. Shorter lengths will raise:

psmgr.core.LengthError: Password length must be >= 12 for more security

View all saved accounts:

To display all saved accounts:

psmgr display-accounts

Example

$ psmgr display-accounts
 ID PLATFORM USERNAME     PASSWORD          CREATED_AT          UPDATED_AT
  3  Threads username E+x'6.w2cV@I 2025-05-15 08:57:16 2025-05-15 10:13:31
  4    Udemy  johndoe E+x'6.w2cV@I 2025-05-15 08:58:54 2025-05-15 08:58:54

Update an account:

To update the password for an account by its ID:

psmgr --update ID

Example

$ psmgr --update 3
New Password: fubgziygih84fr8086
Password updated successfully.

Remove an account:

To remove an account by its ID:

psmgr --remove-account ACCOUNT_ID

Example

$ psmgr --remove 3      
'Threads' removed successfully.

Technologies Used

  • Python 3.x: The script is written in Python and leverages standard libraries.
  • Argparse: For handling command-line arguments.
  • SQLite: For storing account data securely in a local database.
  • Pandas: For formatting and displaying account data in a readable tabular format.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please fork the repository, make changes, and submit a pull request.

Optimized for SEO:

  • Password Manager Python: A reliable, open-source password manager built with Python.
  • Secure password storage: Safely store your passwords with this Python tool.
  • Password generator: Create strong passwords with customizable lengths.

Feel free to create issues or pull requests if you'd like to contribute or have suggestions!

About

This is a Python-based "password manager" that helps you securely store and manage your passwords. With features like password generation, account storage, retrieval, updating, and deletion, this tool is perfect for individuals looking to manage their passwords securely and efficiently.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages