Skip to main content
https://img.shields.io/pypi/v/cloudflare-ddns.svg https://img.shields.io/pypi/l/cloudflare-ddns.svg https://img.shields.io/pypi/wheel/cloudflare-ddns.svg https://img.shields.io/pypi/pyversions/cloudflare-ddns.svg

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

  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', '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()

Metadata

Release files for cloudflare-ddns 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cloudflare-ddns 1.4.0
File Size Uploaded
cloudflare-ddns-1.4.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cloudflare-ddns 1.4.0
File Interpreter ABI Platform
cloudflare_ddns-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / cloudflare-ddns-1.4.0.tar.gz

Download URL cloudflare-ddns-1.4.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9c88767899851de2d6d2053453a99a650ff539908226d9dda3615bde5fb3f807
BLAKE2b-256 checksum
How to use checksums
996424fcbaa7833aba6a9e1ab2bbb301b454e856dafb68c93650f026d67b9e5e
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / cloudflare_ddns-1.4.0-py3-none-any.whl

Download URL cloudflare_ddns-1.4.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58bced6c24c016d50cc54d6825761ea548b6aa69b48935245dd04d2eaa6e56de
BLAKE2b-256 checksum
How to use checksums
1d5065098a67f39f6156460955e770e1497a8516169ede84f1298ab576468119
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 release files

1.3.0

1 release file

1.2.0

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1rc1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page