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.
1. 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"
1.1 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 probably you already have gpg installed)
- create key-pair
gpg --gen-key
and assign it to your e-mail
Now you can encrypt your mypwd.json
with your gpg key:
mypwd encrypt -e your.email@something.com
and later on you can decrypt it back for some modification:
mypwd decrypt
2. Installation
Installation is simple:
pip install mypwd
or
python setup.py install
3. 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.6.0.tar.gz
.
File metadata
- Download URL: mypwd-0.6.0.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92db9a17fbcea889138af6bd8d377dad2f8bc063be0425d940122639d6c9bc8b |
|
MD5 | f37411c16a14133cd698647a594b1183 |
|
BLAKE2b-256 | b8d6a981efb4216776afbb78e83c9bc6be22bfda42cc7763fff513318085af38 |
File details
Details for the file mypwd-0.6.0-py3-none-any.whl
.
File metadata
- Download URL: mypwd-0.6.0-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f946c545a351b014b4e1f8533fd7a4c34cf1abd1a25193618c6aabd41819804 |
|
MD5 | f674eb6948cbaea0bdfd39268f8bf069 |
|
BLAKE2b-256 | d2d1b8110c0fc8135059118c5225d45c38de8a9273c2acf9dc0cc4eeecc2ba0a |