[Python-Dev] Proposal for the getpass module

Tarek Ziadé ziade.tarek at gmail.com
Sun Feb 7 01:08:19 CET 2010


I would like to propose a small change in the getpass module so it's
able to get passwords from keyrings (like KWallet, Keychain, etc)

The idea is to provide a getpass.cfg configuration file where people
can provide the name of a function to use when getpass is called.
Then third-party projects can implement this function. For example the
Python Keyring library.[1] could be installed and configured to be
by people that wants getpass calls to be handled by this tool.

That's a backward compatible change, and it avoids adding any new
module in the stdlib. Plus, it offers a greatly improved getpass
with no risks for the stdlib stability : it becomes a reference
implementation with an interface for third-party implementers.

A prototype is here : http://bitbucket.org/tarek/getpass/ (work in
progress but you can get the idea)

[1] http://pypi.python.org/pypi/keyring


Tarek Ziadé | http://ziade.org

More information about the Python-Dev mailing list