Skip to main content

A module for updating Cloudflare DNS records.

Project description

A module for updating Cloudflare DNS records.


This has been tested with python 3.6
This module require a Cloudflare username and API key.
This module uses these external libararies:

  • json
  • requests


pip install pycfdns


from pycfdns import CloudflareUpdater

cfupdate = CloudflareUpdater()
email = ''
key = 'fks343489734jkhfsfk387dfjksh78'
zone = ''
records = ['None']

#Set headers:
headers = cfupdate.set_header(email,key)

#Get zoneID:
zoneID = cfupdate.get_zoneID(headers, zone)

#Get records to update:
updateRecords = cfupdate.get_recordInfo(headers, zoneID, zone, records)

#Update records:
result = cfupdate.update_records(headers, zoneID, updateRecords)

#Print the result:

Project details

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
pycfdns-0.0.2-py3-none-any.whl (2.9 kB) Copy SHA256 hash SHA256 Wheel py3

Supported by

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