Back in August 2006 I wrote a review on EveryDNS. 2 and half years later nothing much has changed — same interface and same functionality, and it is still serving many of my domains. One thing I don’t like about EveryDNS is its lack of API support, i.e. you cannot programatically update your records. This is especially getting inconvenient when I moved my main emails to Google Apps in January, and moved my currently-unused domains to Google AdSense for domains last week. Hand copying and pasting a big list of records for each domain is just too much work!
So, like any lazy-programmers who do not wish to spend 2 minutes solving a borning problem, I simply spent 2 hours coding up an EveryDNS client API library for Python, so I can add/remove domains/records programatically. This is inspired by the EveryDNS PHP API. It basically scrapes EveryDNS’s web interface.
Downloads
If you just want the library, there’s only a single PY file to download.
Just put it somewhere in your PYTHONPATH. It is developed on Python 2.5 and sorry no guarantee that it will work on any other Python version :)
Usage
Some sample usage of this library:
$ python
Python 2.5.2 (r252:60911, Dec 12 2008, 10:25:58)
Type "help", "copyright", "credits" or "license" for more information.
>>> import everydnslib
>>> edns = everydnslib.EveryDNS(username, password)
>>> edns.list_domains()
[{'did': '...', 'domain': 'example.com', 'type': 'primary'},
{'did': '...', 'domain': 'foobar.com', 'type': 'primary'},
...
{'did': '...', 'domain': 'testing1.com', 'type': 'webhop', 'webhop': 'http://testing2.com/'}]
>>> edns.list_records('example.com')
[{'rid': '...', 'host': 'example.com', 'type': 'A', 'value': '123.123.123.123', 'mx': '', 'ttl': '43200'},
{'rid': '...', 'host': 'example.com', 'type': 'MX', 'value': 'mx.example.com', 'mx': '1', 'ttl': '43200'},
...
{'rid': '...', 'host': 'www.example.com', 'type': 'CNAME', 'value': 'example.com', 'mx': '', 'ttl': '7200'}]
>>> edns.add_domain('example2.com')
>>> edns.add_record('example2.com', 'www.example2.com', 'A', '123.123.123.123')
>>> edns.del_records('example.com', rtype='MX')
>>> edns.del_domain('example.com')
I have also added some helper functions to set up Google-related services.
$ python Python 2.5.2 (r252:60911, Dec 12 2008, 10:25:58) Type "help", "copyright", "credits" or "license" for more information. >>> import everydnslib >>> edns = everydnslib.EveryDNS(username, password) >>> everydnslib.setup_gmail(edns, 'example.com') >>> everydnslib.setup_adsense_for_domain(edns, 'example.com', 'pub-1234567890')
Unfortunately EveryDNS still does not have SRV record support so it is impossible to get Google Talk to work on your domain.
Command Shell
As a test case for the API, I have also created a simple shell to access domains/records on your EveryDNS account. Download the following PY file:
Put the file in the same directory as everydnslib.py. chmod it to executable, and then run it.
$ ./everydnscmd.py username password
[username@everydns] ls
TYPE DOMAIN
primary example.com
primary foobar.org
...
webhop testing1.com
[username@everydns] ls example.com
HOST TYPE VALUE TTL MX
example.com A 123.123.123.123 43200
example.com MX mx.example.com 43200 1
...
www.example.com CNAME example.com 7200
[username@everydns] add example2.com
[username@everydns] add example2.com www.example2.com A 123.123.123.123
[username@everydns] del example.com example.com MX
[username@everydns] del example.com
[username@everydns] help
Documented commands (type help ):
========================================
add del ls
Undocumented commands:
======================
EOF exit help
That’s it!
Hopefully Python coders who use EveryDNS will find this module useful.
Updates 20 June 2009
Thanks to Brian Hartvigsen from EveryDNS for sending me a patch including the following updates:
- Allows listing, adding, deleting dynamic domain’s records
- Remove code that duplicates functionality in the backend
- Fixed regex for domains that are marked as not listing our nameservers
Nothing in Python API indicates this status currently, but this could be added - Updated for forthcoming updates. Compatible w/ existing site too
- Webhops had domain/webhop reversed
While this is not an EveryDNS officially supported API, they are trying not to break it so big thanks to them for providing me updates.
Again, the files are hosted on a Subversion server. If you would to send me patches, do
$ svn checkout http://svn.fucoder.com/fucoder/pyeverydns/ $ ... $ svn diff > unified.diff
And feel free to send that diff to me.

15
Nice work!
There is PHP everydns “wrapper” as well. There is a web interface built around it, but the core EveryDNS class does much the same thing.
http://www.ultrize.com/everydns/
Nice work, thanks.
As I have said in the post — I pretty much got the idea from the PHP version. However I found it’s no good for scripting as it’s very “web-centric”.
Hi,
Thanks for providing this API. It’s been really useful to me. I was wondering if you’d consider moving it to GitHub and actually creating a project out of it.
If you do, I have two patches to submit, if you’d like:
1) Rate limit the url fetches.
2) Catch errors in the command console so it doesn’t just exit after a typo.
Edwin,
It’s currently hosted on a SVN server.
and send the diff to me :)
That’s really so useful. Thanks for that great work!
This is a really nice tool. Any chance of getting cp command to clone a domain, or a mv command that will change the value of an existing record?
To complete the inspirational circle, I used your work to create a php version of your api. It’s a bit more object-y, and not very well tested, but you can find it at http://greyshift.net/~jkolb/everydns/ . I plan on implementing the cp and mv operations I asked for earlier, but it’s late.
Thank you!!
Oh, this just saved me sooooo much time. Entering Google MX records into everydns made me want to slit my wrists.
Until now.
I’ve updated the classes a bit and moved it all to google code, in case anyone cares: http://code.google.com/p/phpeverydns/
Looking good. Thanks.
Hey I like this library and I used it for taking regular YAML backups of my domains. Here is my code in case anyone is interested:
http://github.com/amit/kachara/commit/f38b127e80ad4359e6dcdf142f9bf961171494df
Cheers!
Amit
(how) is it possible to connect with whm/cpanel?
so that we can change dns from whm/cpanel…
tnx
The begging of a ruby port. Currently no command line utility but the ruby/EveryDNS interface is pretty much on par:
http://github.com/beaucollins/everydns_rb
Sorry, meant *beginning not *begging.