Skip to main content

A very simple python client used to update the IP address in A records for GoDaddy managed domains.

Project description

https://travis-ci.org/eXamadeus/godaddypy.svg?branch=master

GoDaddyPy

Python library useful for updating DNS settings through the GoDaddy v1 API.

Source located @ https://github.com/eXamadeus/godaddypy

This concept was spawned from observerss’ pygodaddy @ https://github.com/observerss/pygodaddy.

Setup

First, go to https://developer.godaddy.com/keys/ and request a production API key and secret.

Note: Sometimes the production API keys don’t seem to work correctly. Just delete it and request another one.

Second, install GoDaddyPy with pip.

$ pip install godaddypy

Examples

>>> from godaddypy import Client, Account
>>>
>>> my_acct = Account(api_key='PUBLIC_KEY', api_secret='SECRET_KEY')
>>> client = Client(my_acct)
>>>
>>> client.get_domains()
['domain1.example', 'domain2.example']
>>>
>>> client.get_records('domain1.example', record_type='A')
[{'name': 'dynamic', 'ttl': 3600, 'data': '1.1.1.1', 'type': 'A'}]
>>>
>>> client.update_ip('2.2.2.2', domains=['domain1.example'])
True
>>>
>>> client.get_records('domain1.example')
[{'name': 'dynamic', 'ttl': 3600, 'data': '2.2.2.2', 'type': 'A'}, {'name': 'dynamic', 'ttl': 3600, 'data': '::1',
'type': 'AAAA'},]
>>>
>>> client.get_records(dom, record_type='A', name='@')
[{u'data': u'1.2.3.4', u'type': u'A', u'name': u'@', u'ttl': 3600}]
>>>
>>> client.update_record_ip('3.3.3.3', 'domain1.example', 'dynamic', 'A')
>>>
>>> client.add_record('apple.com', {'data':'1.2.3.4','name':'test','ttl':3600, 'type':'A'})
True
>>> client.delete_records(dom, name='test')
True

TODOs

  • Add more record support (currently only supports ‘A’ records)

  • Make the code suck less (this is my first time writing python)

  • Add unit testing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

GoDaddyPy-2.0.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

GoDaddyPy-2.0.1.macosx-10.11-intel.tar.gz (7.7 kB view details)

Uploaded Source

File details

Details for the file GoDaddyPy-2.0.1.tar.gz.

File metadata

  • Download URL: GoDaddyPy-2.0.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for GoDaddyPy-2.0.1.tar.gz
Algorithm Hash digest
SHA256 e4e42910f7d31432932e59a9867703c5509110a75722c29105758a11b2a409f6
MD5 ba9f62e6b836ad810a07ecdb4bbff90d
BLAKE2b-256 420510a7f35ddd52b506d2a3c4b63334e0a19e3077e66f06a4a2f0a5a09bf289

See more details on using hashes here.

File details

Details for the file GoDaddyPy-2.0.1.macosx-10.11-intel.tar.gz.

File metadata

File hashes

Hashes for GoDaddyPy-2.0.1.macosx-10.11-intel.tar.gz
Algorithm Hash digest
SHA256 6ea5d8741839e65fc4c39a84128dd33702ba277ff6273ba9d87be9e51c103f6e
MD5 d39bd8fff18b978180c3a25b637522f3
BLAKE2b-256 bdcb9b0db202940d38b192f19e195d3ffb5c2deae53ef5e16414e08316e11f2f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page