A module for updating Cloudflare DNS records.
Project description
A module for updating Cloudflare DNS records.
Notes
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
Install
pip install pycfdns
Usage:
from pycfdns import CloudflareUpdater
cfupdate = CloudflareUpdater()
email = 'user@example.com'
key = 'fks343489734jkhfsfk387dfjksh78'
zone = 'example.com'
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:
print(result)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pycfdns-0.0.1.tar.gz
(2.5 kB
view details)
Built Distribution
File details
Details for the file pycfdns-0.0.1.tar.gz
.
File metadata
- Download URL: pycfdns-0.0.1.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bab5075ce792a0159e06240b0584c787600b55b404c0e858a71b43b8322c4b73 |
|
MD5 | 7f092ac9b2aa56693cd8b169e56884c9 |
|
BLAKE2b-256 | 8be10bad8cf1d345919e6df4623e06589542cd99152cce42b0b378857d89ca77 |
File details
Details for the file pycfdns-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pycfdns-0.0.1-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0b0934cce1e2b71216051b46865f41dc2d72915432d978a40ca60e8e36089ba |
|
MD5 | 34b86301ceb086d343b9a23510242138 |
|
BLAKE2b-256 | 7080258bbef32bb88890d62b4b45fe9b98932c54e9b565fd77df3d03aed5c424 |