Welcome to pygodaddy’s documentation!

PyGoDaddy is a 3rd-party client library, written in Python, for site admins(devs), to make GoDaddy suck less.

Currently, Only A-Record manipulation is supported


To install pygodaddy, simply:

pip install pygodaddy

Quick Start

First, import and initiate GoDaddyClient

from pygodaddy import GoDaddyClient
client = GoDaddyClient()

Then we can use login method to login, and update_dns_record method to update dns record (A-Record Only)

if client.login(username, password):
    client.update_dns_record('sub.example.com', '')

A list of methods and be found in API Documents section below

API Documents

class pygodaddy.client.GoDaddyClient[source]

GoDaddy Client Library

Typical Usage:

>>> from pygodaddy import GoDaddyClient
>>> client = GoDaddyClient()
>>> if client.login(username, password):
...     client.update_dns_record('sub.example.com', '')
delete_dns_record(hostname, record_type='A')[source]

delete hostname in accounts

  • hostname – hostname to be deleted
  • record_type – only ‘A’ is implemented for now

True if successful, else False

find_dns_records(domain, record_type='A')[source]

find all dns reocrds of a given domain

Parameters:domain – a typical domain name, e.g. “example.com”
Returns:a dict of (hostname -> DNSRecord)

return all domains of user


Test login according to returned html, then set value to self.logged_in

Parameters:html – the html content returned by self.session.get/post
Returns:True if there’s welcome message, else False
login(username, password)[source]

Login to a godaddy account

  • username – godaddy username
  • password – godaddy password

True if login is successful, else False

update_dns_record(hostname, value, record_type='A', new=True)[source]

Update a dns record

  • hostname – hostname to update
  • value – value for hostname to point to, for A record, it’s like ‘XX.XX.XX.XX’
  • record_type – only ‘A’ is implemented for now
  • new – if True, will create a new record if necessary, default to True

True if update is successful, else False

class pygodaddy.client.GoDaddyAccount(username, password)[source]

This is a context manager for GoDaddyClient


>>> from pygodaddy import GoDaddyAccount
>>> with GoDaddyAccount(username, password) as client:
...    client.update_dns_record('sub1.exmaple.com', '') 
...    client.update_dns_record('sub2.exmaple.com', '') 

Indices and tables

Table Of Contents

This Page