Sigilo provides a secure way to store and retrieve sensitive information like passwords, OAuth access tokens, credit card numbers, etc.
For example, to store a secret on redis using sigilo.Sigilo:
from sigilo import Sigilo
from sigilo.stores.redis import RedisStore
from sigilo.ciphers.fernet import FernetCipher
# Put this somewhere safe!
key = "Ds205mteCt42PaW35TQWtj5LgUB3A541EVf9wy8OyOI="
cipher = FernetCipher(key)
store = RedisStore("redis://localhost:6379/0")
sigilo = Sigilo(store=store, cipher=cipher)
sigilo.set("key1", b"secret value")
To retrieve the secret:
sigilo.get("key1")
# returns b"secret value"
Sigilo requires Python 3.8 or newer to run.
pip install sigilo[redis,cryptography]