Python/keyring: Difference between revisions
< Python
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
https://github.com/jaraco/keyring | https://github.com/jaraco/keyring | ||
# sudo apt | # sudo apt install -y pkg-config cmake libdbus-1-dev libdbus-1-3 libglib2.0-dev | ||
# pip install secretstorage dbus-python | # pip install --upgrade secretstorage dbus-python | ||
pip install keyring | pip install --upgrade keyring | ||
<pre> | <pre> | ||
Revision as of 04:54, 18 September 2026
https://github.com/jaraco/keyring
# sudo apt install -y pkg-config cmake libdbus-1-dev libdbus-1-3 libglib2.0-dev # pip install --upgrade secretstorage dbus-python
pip install --upgrade keyring
>>> import keyring
>>> keyring.set_password("system", "username", "password")
>>> keyring.get_password("system", "username")
'password'
$ keyring --help $ keyring set system username Password for 'username' in 'system': $ keyring get system username password