ykman.settings

Attributes

XDG_DATA_HOME

XDG_CONFIG_HOME

KEYRING_SERVICE

KEYRING_KEY

Configuration

Exceptions

KeystoreError

Error accessing the OS keystore

UnwrapValueError

Error unwrapping a particular secret value

Classes

Settings

dict() -> new empty dictionary

AppData

dict() -> new empty dictionary

Module Contents

ykman.settings.XDG_DATA_HOME
ykman.settings.XDG_CONFIG_HOME
ykman.settings.KEYRING_SERVICE
ykman.settings.KEYRING_KEY
class ykman.settings.Settings(name)[source]

Bases: dict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

fname
__eq__(other)[source]

Return self==value.

__ne__(other)[source]

Return self!=value.

write()[source]
__hash__ = None
ykman.settings.Configuration
exception ykman.settings.KeystoreError[source]

Bases: Exception

Error accessing the OS keystore

exception ykman.settings.UnwrapValueError[source]

Bases: Exception

Error unwrapping a particular secret value

class ykman.settings.AppData(name, keyring_service=KEYRING_SERVICE, keyring_key=KEYRING_KEY)[source]

Bases: Settings

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object’s

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

property keyring_unlocked: bool
Return type:

bool

ensure_unlocked()[source]
get_secret(key)[source]
Parameters:

key (str)

put_secret(key, value)[source]
Parameters:

key (str)

Return type:

None