title: Is there a way to access the keyring in Windows without giving a master password?
body: <p>I'm developing a script with a co-worker that involves connecting to a database. We want to keep the code independent of which one of us uses it, while keeping our passwords private and not having to authenticate over and over during the workday. After some searching (we are both novices in Python) it seems that we can use keyring for this purpose, so I installed it from pip (most likely version 1.2.2 of the library, based on my memory of the installation date).</p>
  
  <p>The problem is that when I try to access my stored passwords, I am prompted to set a master password to access the keyring, as shown here (from IDLE):</p>
  
  <pre><code>&gt;&gt;&gt; import keyring
  &gt;&gt;&gt; keyring.set_password('Service', 'MyUsername', 'MyPassword')
  
  Warning (from warnings module):
    File "C:\Python27\lib\getpass.py", line 92
    return fallback_getpass(prompt, stream)
  GetPassWarning: Can not control echo on the terminal.
  Warning: Password input may be echoed.
  Please enter password for encrypted keyring:
  </code></pre>
  
  <p>After setting the password, I can get and set passwords easily, until I restart the shell. Now I have to enter the master password again:</p>
  
  <pre><code>&gt;&gt;&gt; ================================ RESTART ================================
  &gt;&gt;&gt; import keyring
  &gt;&gt;&gt; print keyring.get_password('Service', 'MyUsername')
  
  Warning (from warnings module):
    File "C:\Python27\lib\getpass.py", line 92
      return fallback_getpass(prompt, stream)
  GetPassWarning: Can not control echo on the terminal.
  Warning: Password input may be echoed.
  Please enter password for encrypted keyring:
  </code></pre>
  
  <p>After entering the master password, this authentication persists only during the current session/between restarts. When running scripts from the command line, it's even worse - I have to authenticate every time the script is run. At this point, keyring is not saving me any time or effort, and I doubt it's making my password any more secure vs. memorization and manual entry.</p>
  
  <p>After searching for solutions, it looks like keyring will automatically authenticate on Unix if the master password is the same as the password for the user account, but this didn't work for me on Windows. </p>
  
  <p>Am I trying to get keyring to do something it's not meant to do, or is there just an error in my implementation?</p>
  
  <p>My experience seems to conflict with that reported by another user who claims (s)he is not prompted for a password when an application tries to access the keyring in the related question, <a href="https://stackoverflow.com/q/14756352/2359271">How does python-keyring work on Windows?</a></p>