It’s a common requirement for shell scripts and python programs to store third-party passwords (SMTP passwords, secret API keys etc) and use them later. Where do you save them?
Just call
vault.get(service, key)
If the (key, value) pair for the service exists aleady, it simply returns the value.
Otherwise it will prompt the user for the value and saves it.
If you have to change the value of the key in future, simply call
vault.set(service, key, new_value)
To get the password for testuser@gmail.com
password=`python -m vault get gmail.com testuser`
If the password is not found, it will prompt the user, saves it and populates password.
To change the value of the key in future
python -m vault set gmail.com testuser new_password
The latest version of this project can be found at : http://bitbucket.org/sramana/vault
The documentation is distributed along with source repository in docs/ directory (in ReStructuredText format). You can run “make html” in that directory to generate HTML version.
Alternatively, you can browse the online documentation at http://sramana.github.com/vault
This project is licensed under New BSD license.
Contributions and Feedback are most welcome. Please email the author with your comments.
Sramana <sramana9@gmail.com>