This is a very simple Python Script I did to update one of my subdomains on linode DNS with my home dynamic ip.
You can copy it, fork it, and use it as you can, on your own responsability.
For me it helps me to maintain my Owncloud server running on my home small server that has a dynamic IP.
I run it every hour, using a crontab, so everytime my IP changes it will take no more than one hour to be updated on the DNS.