fix: Keyring backend
This commit is contained in:
parent
c3c6d2df8d
commit
492531dab2
2 changed files with 3 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ dependencies = [
|
||||||
"py-automapper>=2.2.0",
|
"py-automapper>=2.2.0",
|
||||||
"fastapi-utils>=0.8.0",
|
"fastapi-utils>=0.8.0",
|
||||||
"keyring>=25.6.0",
|
"keyring>=25.6.0",
|
||||||
|
"keyring-backend>=0.1.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[dependency-groups]
|
[dependency-groups]
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,8 @@ class Passwords:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
from config import get_settings
|
from config import get_settings
|
||||||
settings = get_settings()
|
settings = get_settings()
|
||||||
|
import keyring_backend
|
||||||
|
keyring.set_keyring(keyring=keyring_backend.Backend())
|
||||||
|
|
||||||
with open(settings.kp.secret, "r") as fh:
|
with open(settings.kp.secret, "r") as fh:
|
||||||
keyring.set_password("karl", "kp", fh.read().splitlines()[0])
|
keyring.set_password("karl", "kp", fh.read().splitlines()[0])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue