Using keyring in Kupfer (Passwords File)

29 views
Skip to first unread message

ulrik

unread,
Feb 6, 2010, 12:29:35 PM2/6/10
to Python Keyring Lib
Hi,

We intend to use python-keyring in Kupfer, a linux application. The
application leans towards Gnome but wants to be cross-desktop so this
library is just perfect. It also provides a fallback as good as or
better as one we could provide ourselves.

The fallback keyring stores passwords in a non-dotfile in the home
directory. We will patch this to tell it to use a file inside our
application's configuration directory:

@classmethod
def _configure_keyring(cls):
# Configure the fallback keyring's configuration file if used
kr = keyring.get_keyring()
if hasattr(kr, "file_path"):
kr.file_path = config.save_config_file("keyring.cfg")

So we typically use ~/.config/kupfer/keyring.cfg

A quick inspection suggests this is safe to do. For our application we
feel it is unacceptable that we leave user-visible files polluting the
user's home directory.

What do you think? Will it be supported in future versions to relocate
the fallback's password storage?

Regards,
Ulrik

Tarek Ziadé

unread,
Feb 6, 2010, 12:57:27 PM2/6/10
to python-...@googlegroups.com

I think we could also provide a mechanism to make it possible to
configure the path
used to make your life easier. Does a environ variable is acceptable ?

Something like : KEYRING_CFG_PATH

Regards
Tarek

ulrik

unread,
Feb 8, 2010, 4:41:07 AM2/8/10
to Python Keyring Lib

On Feb 6, 6:57 pm, Tarek Ziadé <ziade.ta...@gmail.com> wrote:

In my opinon, the method I posted in my original email is better than
using an environment variable.


> Regards
> Tarek

Reply all
Reply to author
Forward
0 new messages