0

I have a config file like this:

user=cn=read-only-admin,dc=example,dc=com
password=somepassword

I want to save password to keyring. I can use keyrin password in python files with keyring library :

pass = keyring.get_password("system","administrator")

Is there any way to using keyring in config file? I'm using python 2.7 in my projects.

6
  • What do you mean under 'using keyring in config file'? Commented Jul 13, 2017 at 11:32
  • I don't want to write password as text but reading from keyring Commented Jul 13, 2017 at 11:35
  • @zwer I think it isn't safe way to get password as text in sourcecode Commented Jul 13, 2017 at 11:37
  • Well, it seems you already know how to retrieve a password from a keyring, so what exactly is a problem here? Commented Jul 13, 2017 at 11:53
  • @zwer I don't know how to use it in a file for example app.config Commented Jul 13, 2017 at 11:57

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.