Skip to main content

Update Cloudflare DNS A-records.

Project description

Update CloudFlare DNS A records.

Update A records in your DNS zone.


python3 -m pip install pycfdns


"""Example usage of pycfdns."""
import asyncio
import aiohttp
from pycfdns import CloudflareUpdater

API_TOKEN = "5cdba21d55cdba21d55cdba21d5"
ZONE = ""

async def example():
    """Example usage of pycfdns."""
    async with aiohttp.ClientSession() as session:
        cfupdate = CloudflareUpdater(session, API_TOKEN, ZONE, UPDATE_RECORDS)
        zone_id = await cfupdate.get_zone_id()
        records = await cfupdate.get_record_info(zone_id)
        for record in records:
        await cfupdate.update_records(zone_id, records)


Project details

Download files

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

Files for pycfdns, version 1.2.1
Filename, size File type Python version Upload date Hashes
Filename, size pycfdns-1.2.1-py3-none-any.whl (5.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pycfdns-1.2.1.tar.gz (3.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page