config

Config for Sherlock.

source

SherlockConfig

 SherlockConfig (priv:str='')

source

save_cfg

 save_cfg (cfg:dict, path=None)

Save config to file


source

get_cfg

 get_cfg (path=None)

Get config from XDG config dir, creating if needed

test_dir = 'tmp_test'
cfg_path = Path(test_dir)/'sherlock.conf'
cfg_path
Path('tmp_test/sherlock.conf')
get_cfg(path=cfg_path)
{'priv': ''}
save_cfg({'priv': '912j3i9x...'}, cfg_path)
get_cfg(path=cfg_path)
{'priv': '912j3i9x...'}
shutil.rmtree(test_dir)