A command line GoDaddy API Implementation (in Python)

in #utopian-io7 years ago (edited)

cli_py_—_godaddy.png

  • What is the project about?
    Implementation of GoDaddy API.
  • Technology Stack
    Python 2.7/3.x and "requests" module for http requests to GoDaddy API.
  • Roadmap
    For now there are two methods: list dns records and add a dns record. There are lot of missing API endpoints, but for now it's stable.
  • How to contribute?
    I need to implement other GoDaddy methods. I will be validating and accepting pull requests from your forks or I may give you access depending on how interested are you in working in this project.

Security

The auth key and secret are stored and ciphered with AES encryption in a file, given a password to protect it.

Installation

pip install gopapi

Some examples:

Listing a domain DNS records

gopapi domain yourdomain.com records

Adding a dns records

gopapi domain yourdomain.com add-record CNAME asubdomain another.domain.com
# where another.domain.com is the domain this CNAME record will point.

References

GoDaddy API DOCS

Extras

Papi stands for "daddy" in spanish.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Hey @gama I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

Good work. keep it up!!!

Up voted and followed.
Please follow me on Steemit: https://steemit.com/@labwork

Thank you, following now.

Thank you for the contribution. It has been approved.

Please make your contribution more narrative in nature.

You can contact us on Discord.

[utopian-moderator]

I like the name! Was wondering if you know where I can learn about creating a CLI for something with Python?

I don't have an specific place to tell your where to learn, but i can give you some hints:

  • For parsing the arguments in the execution, use the module "argparse".
  • For asking for passwords in a terminal, the module "getpass".
  • For making an binary available to be executed, create the file inside the bin folder of your project (i.e. gopapi), this way will be available in your os to call like that, instead of "python -m gopapi.cli". Inside this file you will be calling your module itself.
  • For calling other process: subprocess or os.system (not recommended for security reasons).
    I will be doing a tutorial for this anyway, thanks your commentary. Hablas español?

Thanks for the hints, I will definitely check out those modules! And unfortunately I don't speak Spanish, but I wish I could... I'm terrible with languages, though.