Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Sync DNS records stored in a flat file format to your DNS provider.

Project Description

Sync DNS records stored in a flat file format to your DNS provider. Cloudflare support currently provided.


$ pip install namesync

Quick Guide

Create a file with the name of your domain:

$ touch

Or, if you have existing records, you can export them:

$ namesync --get

Enter one record per line with the following format:

<record-type> <name> <value> <ttl:optional>

For example:

A       *         # You can even use comments
A       .         # . references the domain itself,
A       test
A       example 86400
CNAME   mail
MX      .

MX records allow you to specify a priority:

MX <name> <value> <priority:optional> <ttl:optional>

Like this:

MX      . 20
MX      . 30 86400

If the value contains spaces, quote it:

TXT     .       "v=spf1 a ~all"

Then sync your records:

$ namesync

You will be given a chance to review your changes before they are synced:

The following changes will be made:
ADD    A     *
ADD    A     example 86400
ADD    A     test
ADD    CNAME mail
ADD    MX    .
UPDATE A     .
REMOVE A     old
Do you want to continue? [y/N]


usage: namesync [-h] [-g] [-z ZONE] [-y] [-d DATA_DIR] [-t] RECORDS

positional arguments:
  RECORDS               file containing DNS records, one per line. The zone is
                        derived from the basename of this file. For example,
                        if "dns/" is used then the zone is assumed
                        to be "" unless the --zone option is used

optional arguments:
  -h, --help            show this help message and exit
  -g, --get             save existing DNS records to RECORDS
  -z ZONE, --zone ZONE  specify the zone instead of using the RECORDS filename
  -y, --yes             sync records without prompting before making changes
  -d DATA_DIR, --data-dir DATA_DIR
                        the directory where namesync.conf and other cache data
                        is stored. [default: ~/.namesync]
  -t, --dry-run         print actions and exit without making any changes

Release History

This version
History Node


History Node


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
(13.5 kB) Copy SHA256 Hash SHA256
Source None Aug 11, 2015

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Google Google Cloud Servers Fastly Fastly CDN StatusPage StatusPage Statuspage DigiCert DigiCert EV Certificate