octodns-nested-zones
Nested zone source for octoDNS.
Combines records from a source zone and its configured sub-zones into a single zone. This is useful when an upstream provider (e.g. AXFR) is limited to a single zone at a time but you need to sync records from multiple zones into a target that does not support zones on subdomains.
Motivation
Providers like AXFR (zone transfer) are scoped to one zone. If you have
delegated sub-domains managed in separate zones (e.g. sub1.example.com,
sub2.example.com), a plain AXFR source for example.com will only see
records from the example.com zone itself - it would not include the
records that live in the sub-zone files.
This source wraps another source (like AXFR) and:
- Fetches records for the primary zone
- Fetches records for each configured sub-zone
- Merges everything into a single combined zone
The merged zone can then be synced to any target provider that doesn't understand or cares about zone boundaries.
Installation
pip install octodns-nested-zones
Configuration
Use a YAML anchor to share the inner source configuration:
providers:
axfr: &axfr
class: octodns.source.axfr.AxfrSource
host: ns1.example.com
key: env/AXFR_KEY
nested:
class: octodns_nested_zones.NestedSource
source: *axfr
sub_zones:
- sub1
- sub2
zones:
example.com.:
sources:
- nested
targets:
- your_dns_provider
Each entry in sub_zones is relative to the primary zone -
e.g. sub1 resolves to sub1.example.com. when populating the
example.com. zone.
How it works
On each sync cycle, the source:
- Calls the inner source's
populate()for the primary zone - For each sub-zone, creates a temporary
Zone, calls the inner source'spopulate(), then copies the records into the primary zone with their full qualified names (e.g. a recordappfrom thesub1.example.com.zone becomesapp.sub1inexample.com.) - All records (primary and sub-zone) end up in the same zone
Development
# Install dependencies
uv sync --group dev
# Run tests
uv run pytest
Releasing
- Update
CHANGELOG.md— move the new version's entry from- unreleasedto a date and add any missing items. - Commit and push to
main. - Tag the release:
git tag 0.2.0 && git push --tags.
CI will run the test suite, build the package, create a GitLab Release with the changelog section, and publish to PyPI.
Changes
See CHANGELOG.md for release history.
License
MIT
Metadata
Release files for octodns-nested-zones 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| octodns_nested_zones-0.3.0.tar.gz | 65.0 kB | Without provenance | Details for octodns_nested_zones-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| octodns_nested_zones-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for octodns_nested_zones-0.3.0-py3-none-any.whl |
Total release size: 71.5 kB
Release files / octodns_nested_zones-0.3.0.tar.gz
| Download URL | octodns_nested_zones-0.3.0.tar.gz |
|---|---|
| Size | 65.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
936eba8f435add09760d07d90bde25e5d074eb5c87516a11f964331d44f0b504
|
|
BLAKE2b-256 checksum How to use checksums |
8d1281b562a1b22ea020b62381f2f22b7e05425824deb3b2d141a709abf9797b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / octodns_nested_zones-0.3.0-py3-none-any.whl
| Download URL | octodns_nested_zones-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e9f4117f65807be74f271ba975d24331a051c4eb70e81a8e74feda08462e1dd4
|
|
BLAKE2b-256 checksum How to use checksums |
b49e2b935851a6caa1f0c8111180c8f31ca452762a05b22b0070d673c004c17b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for octodns-nested-zones 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.