skip to navigation
skip to content

cloudflare-ddns 1.2.0

DDNS script to sync public IP address to CloudFlare dns records

The Python DDNS(Dynamic DNS) script for CloudFlare. It can sync your public IP address to DNS records on CloudFlare. It also provide the RESTful API to operate CloudFlare API v4.


pip install cloudflare-ddns


  1. Sync your public ip address to dns record on CloudFlare

    • Use command in command line
    cloudflare-ddns email api_key domain
    • Print command line help
    cloudflare-ddns --help
    • Execute python package in command line
    python -m cloudflare_ddns email api_key domain --proxied
    • Python code
    from cloudflare_ddns import CloudFlare
    cf = CloudFlare(email, api_key, domain)
    cf.sync_dns_from_my_ip() # Successfully updated IP address from xx.xx.xx.xx to xx.xx.xx.xx
  2. RESTful dns record operation

cf.get_record('A', '')
cf.create_record('A', '', '')
cf.update_record('A', '', '')
cf.delete_record('A', '')

Please note: The class will cache dns records information it gets from CloudFlare. To refresh cache, call ‘refresh’ method:

File Type Py Version Uploaded on Size
cloudflare-ddns-1.2.0.tar.gz (md5) Source 2017-05-22 4KB
cloudflare_ddns-1.2.0-py3-none-any.whl (md5) Python Wheel py3 2017-05-22 6KB