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.
Installation
pip install cloudflare-ddns
Examples
Sync your public ip address to dns record on CloudFlare
cloudflare-ddns email api_key domain
cloudflare-ddns --help
python -m cloudflare_ddns email api_key domain --proxied
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
RESTful dns record operation
cf . get_record ( 'A' , 'example.com' )
cf . create_record ( 'A' , 'sub.example.com' , '202.202.202.202' )
cf . update_record ( 'A' , 'another.example.com' , '202.202.202.202' )
cf . delete_record ( 'A' , 'another.example.com' )
Please note: The class will cache dns records information it gets from CloudFlare. To refresh cache, call ‘refresh’ method:
cf . refresh ()
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages .
Source Distribution
Built Distribution
File details
Details for the file cloudflare-ddns-1.4.0.tar.gz
.
File metadata
Download URL:
cloudflare-ddns-1.4.0.tar.gz
Upload date: Jan 3, 2021
Size: 5.4 kB
Tags: Source
Uploaded using Trusted Publishing? No
Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1
File hashes
Hashes for cloudflare-ddns-1.4.0.tar.gz
Algorithm
Hash digest
SHA256
9c88767899851de2d6d2053453a99a650ff539908226d9dda3615bde5fb3f807
Copy
MD5
f63778928a17b5ccc4da1bd72e143f04
Copy
BLAKE2b-256
996424fcbaa7833aba6a9e1ab2bbb301b454e856dafb68c93650f026d67b9e5e
Copy
See more details on using hashes here.
File details
Details for the file cloudflare_ddns-1.4.0-py3-none-any.whl
.
File metadata
Download URL:
cloudflare_ddns-1.4.0-py3-none-any.whl
Upload date: Jan 3, 2021
Size: 6.1 kB
Tags: Python 3
Uploaded using Trusted Publishing? No
Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.9.1
File hashes
Hashes for cloudflare_ddns-1.4.0-py3-none-any.whl
Algorithm
Hash digest
SHA256
58bced6c24c016d50cc54d6825761ea548b6aa69b48935245dd04d2eaa6e56de
Copy
MD5
b582001a9eacf8e339181f13798757ba
Copy
BLAKE2b-256
1d5065098a67f39f6156460955e770e1497a8516169ede84f1298ab576468119
Copy
See more details on using hashes here.