Skip to main content

downloads climate

GoDaddyPy

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

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

GoDaddyPy supports three methods for providing your credentials to the library, which are honored in the following order:

  1. Passing them directly to the Account object

  2. Setting the GODADDY_API_KEY and GODADDY_API_SECRET environment variables

  3. Storing them in a credentials.yml file

For convenience, a configuration tool has been provided that can be run from your terminal or in Python. This tool will prompt for your API key and secret, and store them in a config file in your home directory following the XDG Base Directory specification. I have only tested this on Mac, but it should also work on Linux. I recommend env vars for Windows and/or CI/CD.

$ python -m godaddypy
>>> from godaddypy import Account
>>> acct = Account.configure()
Enter GoDaddy API Key [None]: example_key
Enter GoDaddy API Secret [None]: example_secret
>>> account = Account()
>>> account._config
Configuration(key='example_key', secret='example_secret')

Examples

Also see /examples for more examples.

>>> from godaddypy import Client, Account
>>>
>>> my_acct = Account(api_key='PUBLIC_KEY', api_secret='SECRET_KEY')
>>> client = Client(my_acct)
>>>
>>> # Or if you want to use a delegate...
>>> delegate_acct = Account(api_key='PUBLIC_KEY', api_secret='SECRET_KEY', delegate='DELEGATE_ID')
>>> 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

Contributing

If you want to contribute, first off: thank you! Second, please check out the Contributing Guidelines, CONTRIBUTING.

Steps to Contribute

  1. Pull the repository

  2. Run make install to install the library and development dependencies

  3. Make changes

  4. Add tests

  5. Open a pull request towards the main branch

Release files for GoDaddyPy 2.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for GoDaddyPy 2.5.1
File Size Uploaded
GoDaddyPy-2.5.1.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for GoDaddyPy 2.5.1
File Interpreter ABI Platform
GoDaddyPy-2.5.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 21.1 kB

Release files / GoDaddyPy-2.5.1.tar.gz

Download URL GoDaddyPy-2.5.1.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
db54c3a023b65f1b4b7793c8bdac0f778bb02044817df1f412c76540e2e0ae9a
BLAKE2b-256 checksum
How to use checksums
4a30b78622c36ac91c8fbd936958c0e1cd0fea9223adf97e8f8d1228e62b4609
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release files / GoDaddyPy-2.5.1-py2.py3-none-any.whl

Download URL GoDaddyPy-2.5.1-py2.py3-none-any.whl
Size 9.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
22da1e2d93225e605bc150992b9ed477677f782c87e0ed3e0c47d2cbc13ece53
BLAKE2b-256 checksum
How to use checksums
aeb4adc6fa27b3323e1357e574d3c6fa1fd7886c687eac011ebbd20df2789195
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.5

Release history Release notifications | RSS feed

This release

2.5.1 This release

2 release files

2.5.0

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.4

2 release files

2.3.3

2 release files

2.2.7

1 release file

2.2.6

2 release files

2.2.5

2 release files

2.2.4

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.1.2

3 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.1.3

1 release file

1.1.2

1 release file

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.1.6

0.1.5

2 release files

0.1.4

2 release files

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page