Very simple password manager for my python projects
Project description
MyPwd
Very simple password manager for my python projects.
I often forgot the passwords in my scripts and committed them to the repository. So I created a simple password manager so that it doesn't happen to me anymore.
Usage
Create file mypwd.json
with passwords in your home directory. For example C:\Users\jarberan\mypwd.json
{
"mongo-uat": {
"login": "appl",
"password": "hS78#pbTgc#J.CQL",
"server": "myserver-uat.com",
},
"mongo-dev": {
"login": "appl",
"password": "VacK>p3k3~t*c~RX",
"server": "myserver-dev.com",
"note": "Valid until end of month"
}
}
Now you can access your secrets from python code and you will never commit secret anymore.
import mypwd
login, password, server = mypwd.get_values("mongo-dev", ["login", "password", "server"])
uri = f"mongodb://{login}:{password}@{server}/admin?retryWrites=true&w=majority"
Keep your passwords safe and encrypt mypwd.json with GPG
You should store your passwords in encrypted file mypwd.json.gpg
instead of in plain text file mypwd.json
.
- install GPG (if you are using GitBash you probably have gpg already installed)
- create key-pair
gpg --gen-key
- encrypt your passwords
gpg --output mypwd.json.gpg --encrypt --recipient your@email.com mypwd.json
- try to decrypt it
gpg --decrypt mypwd.json.gpg
- finally you can remove plain text file
rm mypwd.json
and mypwd will usemypwd.json.gpg
Installation
Installation is simple:
pip install mypwd
or
python setup.py install
Contribution
Feel free create issue or pull request.
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
Built Distribution
File details
Details for the file mypwd-0.5.0.tar.gz
.
File metadata
- Download URL: mypwd-0.5.0.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b25cac0e0cacd09cd564e6c0b249a006b6f3657ee9dc53e3b4aecc1a73336eb |
|
MD5 | 6b222f1eb38045ef28eae8d6a8197a46 |
|
BLAKE2b-256 | be370fb567a1a0dfa116dd05057d8ab55a4c1381a035eaf0dce2b7a3c767eeb1 |
File details
Details for the file mypwd-0.5.0-py3-none-any.whl
.
File metadata
- Download URL: mypwd-0.5.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8b795bea2b4b737dcbfb748b54aece745973a16c7b89b474586c8c70cc0f16b |
|
MD5 | 99836f4670d72ec45c69508123217f12 |
|
BLAKE2b-256 | b23d104d8cc854f6a8cc0e26566ce6dd77166740b2763a953bd5225e908e5f36 |