Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(config): add file and CLI configuration support #44

Merged
merged 10 commits into from
Nov 12, 2023

Conversation

eXamadeus
Copy link
Owner

@eXamadeus eXamadeus commented Nov 12, 2023

Why

Passing in credentials in the code is messy and could cause security issues. This change adds the ability to pull in credentials from the env OR a credentials file. The file logic is based on the XDG standard.

If you have a configuration file on your system or the proper env variables set, you no longer need to provide credentials when you instantiate an Account. You can set the credentials once, then whenever an Account is made, it will pull from the configuration.

What

Two new methods of storing credentials will be supported. Only one is required. The order of precedence will be the configuration file

  • Support passing credentials via env variables
    • Set GODADDY_API_KEY to the api key
    • Set GODADDY_API_SECRET to the secret key
  • Support XDG-compliant configuration file
    • Add in CLI support for configuring this file using:
      • python -m godaddypy or
      • Account.configure()

@eXamadeus eXamadeus enabled auto-merge (squash) November 12, 2023 22:09
@eXamadeus eXamadeus merged commit c2b5b6c into main Nov 12, 2023
@eXamadeus eXamadeus deleted the feat/add-configuration-file-support branch November 12, 2023 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant