https://github.com/fedi6431/password-manager
A simple password manager with json database
https://github.com/fedi6431/password-manager
linux not-secure password-manager python tool windows
Last synced: 3 months ago
JSON representation
A simple password manager with json database
- Host: GitHub
- URL: https://github.com/fedi6431/password-manager
- Owner: Fedi6431
- License: gpl-3.0
- Created: 2024-06-08T19:37:00.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-11-19T21:09:53.000Z (7 months ago)
- Last Synced: 2026-01-03T22:52:29.480Z (6 months ago)
- Topics: linux, not-secure, password-manager, python, tool, windows
- Language: Python
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Password Manager
## Description
A simple password manager that allows users to store and retrieve passwords for various websites. The passwords are stored in a JSON file and can be accessed through a command-line interface.
## Features
- Store passwords securely in a JSON file.
- Retrieve stored passwords.
- Simple command-line interface.
## Installation
1. Clone the repository:
```bash
git clone https://github.com/Fedi6431/PasswordManager.git
```
2. Navigate to the project directory:
```bash
cd PasswordManager
```
## Usage
1. Run the script:
```bash
python password_manager.py
```
2. Follow the on-screen instructions to add or retrieve passwords.
## Code Explanation
### Functions
- `load_passwords(filename)`: Loads existing passwords from a JSON file.
- `save_passwords(passwords, filename)`: Saves passwords to a JSON file.
- `add_password(passwords, website, username, password)`: Adds a new password to the dictionary.
- `get_password(passwords, website)`: Retrieves a password from the dictionary.
### Main Loop
The main loop provides a command-line interface for users to interact with the password manager. Users can choose to add a new password, retrieve a stored password, or quit the application.
## Example
```python
# Example usage
password_file = "passwords.json"
passwords = load_passwords(password_file)
# Add a new password
add_password(passwords, "example.com", "user123", "password123")
save_passwords(passwords, password_file)
# Retrieve a password
stored_password = get_password(passwords, "example.com")
print(stored_password)
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
## Contact
For any questions or suggestions, please contact [Fedi6431](https://github.com/Fedi6431).