Store application credentials in keyring with RSA and AES.
Project description
Credentials Safe
Store application credentials in keyring with RSA and AES.
Hierarchy
credsafe
'---- Agent()
|---- set()
|---- get()
|---- rm()
'---- destroy()
Example
python
from credsafe import *
# initialize an agent
kp = { # check easyrsa for more info
"private_key": b"...",
"public_key": b"..."
}
credsafe_agent = Agent(app_name="my app", key_pair=kp)
# set something JSON-serializable for a user
credsafe_agent.set(id="username", pw="password", k="phone", v=123456789)
credsafe_agent.set(id="username", pw="password", k="config", v={"something": "secret"})
# get something for a user
print(credsafe_agent.get(id="username", pw="password", k="phone"))
# 123456789
print(credsafe_agent.get(id="username", pw="password", k="config"))
# {"something": "secret"}
# remove something for a user
credsafe_agent.rm(id="username", pw="password", k="config")
print(credsafe_agent.get(id="username", pw="password", k="config"))
# KeyError
# destroy everything for a user
credsafe_agent.destroy(id="username")
shell
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
credsafe-0.0.35.tar.gz
(3.5 kB
view hashes)
Built Distribution
credsafe-0.0.35-py3-none-any.whl
(16.3 kB
view hashes)
Close
Hashes for credsafe-0.0.35-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 974b5e0ec8ef00285a8417879ece941453ab38ca08cb11e704c0756f1a686d91 |
|
MD5 | 11675a7fb19dc0e9ef1a6271341382d8 |
|
BLAKE2b-256 | 2f0ef7fe1123ec5ca8626d900498520d91152f95ebe8a54d71f50e5ab42b52f5 |