In short: because the R package gives the credentials a name like
:service-name:user-name, while the Python package simply uses
user-name@service-name if there are multiple credentials for the same user).
If you want to store credentials for user
mjw for the service
local-database, the best way to do that is to open Windows Credential Manager (Start > Credential Manager), click Add a generic credential, and enter:
- Internet or network address:
Then, to retrieve the password, call
keyring::key_get("local-database", "mjw") in R or
keyring.get_password(u":local-database:mjw", u"mjw") in Python.
I don’t recommend using either library’s built-in function for saving the credential (
keyring.set_password()); it can prevent the other library from being able to read it.