Skip to main content

DDNS script to sync public IP address to CloudFlare dns records

Project description

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:


Project details

Release history Release notifications

This version
History Node


History Node


History Node


History Node


History Node


History Node


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
cloudflare_ddns-1.2.0-py3-none-any.whl (6.9 kB) Copy SHA256 hash SHA256 Wheel py3 May 22, 2017
cloudflare-ddns-1.2.0.tar.gz (5.1 kB) Copy SHA256 hash SHA256 Source None May 22, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page