I added a little bit to client.py that will attempt to use the python-keyring library to get the password for the user. That way a new client can be created with
client = myfitnesspal.Client('username', '')
and a password doesn't have to be stored in any scripts. If keyring isn't installed, it just falls back to the original behavior. I'm not sure if this is something that would be of interest to you or not, but I figured I'd send it along just in case.
To add your password to the keyring, you would do the following (one-time):
Thanks for your contribution, @jat255; I've merged your changes (with modification) in bf25b638cc62e4e107b84cb37dc5dbdcdbf2f4b9 and keyring support will go out in the next release.
Hi there,
I added a little bit to
client.py
that will attempt to use thepython-keyring
library to get the password for the user. That way a new client can be created withand a password doesn't have to be stored in any scripts. If keyring isn't installed, it just falls back to the original behavior. I'm not sure if this is something that would be of interest to you or not, but I figured I'd send it along just in case.
To add your password to the keyring, you would do the following (one-time):