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.2.tar.gz (5.0 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.2.macosx-10.11-x86_64.tar.gz (8.0 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for GoDaddyPy-2.0.2.tar.gz
Algorithm Hash digest
SHA256 32baa99434fea3fa64838b964e6454895f31ddf21e338e11b7f002821cbfcfe7
MD5 915881568a1da0545a2896b0cf8a6dc5
BLAKE2b-256 9e49621d58743e583cd4e31b8806d1aac134c12167082f974bce44493a012dd7

See more details on using hashes here.

File details

Details for the file GoDaddyPy-2.0.2.macosx-10.11-x86_64.tar.gz.

File metadata

File hashes

Hashes for GoDaddyPy-2.0.2.macosx-10.11-x86_64.tar.gz
Algorithm Hash digest
SHA256 cd9c620c5d7c5e2ae3e4a3e8a397ff4f56e3ec7522264ce9cbda777d831b3692
MD5 1a7866a11b933dfe3d2c06775d426451
BLAKE2b-256 a476a53c2894bf0ff7d8ec0d2ff8ee30090cfc237c9c5271542676eb6f709632

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