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')
>>> delegate_acct = Account(api_key='PUBLIC_KEY', api_secret='SECRET_KEY', delegate='DELEGATE_ID')
>>> client = Client(my_acct)
>>> delegate_client = Client(delegate_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('apple.com', 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')
True
>>>
>>> client.add_record('apple.com', {'data':'1.2.3.4','name':'test','ttl':3600, 'type':'A'})
True
>>>
>>> client.delete_records('apple.com', name='test')
True

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.2.4.tar.gz (5.8 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.2.4-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for GoDaddyPy-2.2.4.tar.gz
Algorithm Hash digest
SHA256 7ee537089928335445c3486c23e2086d888a3ee276218ba48f6a407eaaecf4cc
MD5 e9b3cce2ac0f957f80baa4995b5bb0d7
BLAKE2b-256 122a5c49693f0cdcaf78d3c1252980e08a238872e35fc5ab60d9e45e85ef2a96

See more details on using hashes here.

File details

Details for the file GoDaddyPy-2.2.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for GoDaddyPy-2.2.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 94792ed92fbfd06a7b1e05beb34d45a25658472a448a61ba3cd687d75635f1ef
MD5 17dcff0c63d48d42091f0bcf6deb2630
BLAKE2b-256 dbddd03c3319277a35fb7fb5455f7a0e8fa8235f9642124a00774971e9b0751a

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