eXamadeus/godaddypy

Please, add a simple cmd line tool and and external file for username/password configuration.

fpl opened this issue · 3 comments

fpl commented

The library is a good idea, but adding a simple tool to add/update records would be a great one: that would avoid the need to write yet another script for simple use. For the same reason adding a simple dot file in ini/yaml format for credentials would be a nice addon, too. Just my 2 cents.

@fpl
I created a fork of this repo and added the functionality or a credentials file in your home directory called ~/.godaddy/credentials to store your api_key and api_secret. You can goto https://github.com/avitko001c/godaddypy.git to check it out.

@avitko001c : Nice initiative! May I offer a suggestion? Use ~/.config/godaddy instead of ~/.godaddy, as the XDG Standard recommends, to avoid more clutter in user's home root. It can be as easy as:

configfile = pathlib.Path(pathlib.expanduser(os.environ.get('XDG_CONFIG_HOME', '~/.config')),
                          'godaddy/credentials')

I went ahead and implemented a configuration solution here: #44

It follows the XDG standard and allows users to set ~/.config/godaddypy/credentials.yaml to store credentials. It also has a nice simple configuration flow, so there's no need to manually edit the file.