Skip to main content

Store application credentials in keyring with RSA.

Project description

Credentials Safe

version license pyversions powered made

Store application credentials in keyring with RSA.

Hierarchy

credsafe
'---- Agent()
    |---- set()
    '---- get()

Example

python

from credsafe import *

# initialize an agent
kp = {  # check easyrsa for more info
    "private_key": b"...",
    "public_key": b"..."
}
import os
# remember this key otherwise you cannot get credentials
key = os.urandom(64)
credsafe_agent = Agent(app_name="my app", key_pair=kp, hmac_key=key)

# set something 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"}

shell



          

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

credsafe-0.0.7.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

credsafe-0.0.7-py3-none-any.whl (16.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page