# install
pip install keyring keyrings.alt
# Edit ~/.config/python_keyring/keyringrc.cfg:
[backend]
default-keyring=keyrings.alt.file.PlaintextKeyring
keyring.set_password(systemname, username, password)
passwd = keyring.get_password(systemname, username)