Python script for syncing zone data with Mythic Beasts primary DNS API service.
Disclaimer: Although this script accesses an API provided by Mythic Beasts, the owner of this repository is not affiliated with them and this software is not endorsed by Mythic Beasts Ltd.
This script operates by fetching all the existing zone records, deleting them and then adding those specified in a file. This effectively synchronises the nameserver zone with the one in the file. Both the deletions and additions are performed in a single transaction.
For help, run
./sync-zone.py -h, which will print all the options.
pipenv run python3 -- ./sync-zone.py --credentials-file credentials.json --zone example.org --zone-file zones/example.org
You must pass
pipenv otherwise it will consume all the arguments
- Python 3.x (development is done in 3.6.x). Python 2 is intentionally not supported.
This script assumes that you are using the 'Mythic Beasts nameservers only' template and that the SOA and NS records for the zone already exist. The script will not allow you to upload new SOA and NS records, nor will it remove any existing SOA and NS records.
Only a subset of record types are supported at present because the author does not need the others.
If you are having trouble using the script, or have run across a bug, please open an issue on GitHub. This support route is free and provided in the author's spare time.
Paid support is available directly from the author. Please email them at email@example.com for details.
Contributions are welcome using the following mechanisms:
- Bug fixes: Fork the repository, make your changes and then open a pull request.
- New features: Open an issue with the rough details of the proposed new feature.
This script is intended to be very specific and has a limited use case. If you are thinking about adding new functionality, please open an issue first outlining the changes you are proposing so that you don't spend a lot of time developing a feature which may never be merged.
If you want to substantially expand on this script, you are welcome and encouraged to fork the repository.
This software is available under the MIT licence, details of which can be found