Skip to main content

octodns-metaname

OctoDNS provider for the Metaname DNS API, originally bootstrapped from the upstream octodns-template. Use it to run a DNS-as-Code workflow with OctoDNS for any zones you host at Metaname.

Installation

PyPI release:

pip install octodns-metaname

If you rely on the OpsDev.nz 1Password resolver, install the optional extra:

pip install octodns-metaname[onepassword]

Editable install for local development:

python -m venv venv && source venv/bin/activate
pip install -e .[dev]

OctoDNS integration

Once installed, the provider is available via the entry point metaname. Sample config.yaml fragment:

providers:
  metaname-test:
    class: octodns_metaname.MetanameProvider
    base_url: https://test.metaname.net/api/1.1

Populate/apply workflows follow the standard OctoDNS CLI tools. Consult the OctoDNS docs for full CLI details.

Domain lifecycle CLI

Domain registration is separate from DNS record management. The CLI defaults to Metaname's test API:

octodns-metaname check example.nz
octodns-metaname list
octodns-metaname register example.nz --term 12 --confirm

Pass --production before the command to use the live API. Registration requires --confirm because it consumes test credit or incurs a production charge. Omitting --nameserver selects Metaname hosted DNS.

Optional registration during apply

The provider can register a missing domain immediately before applying its records. This is disabled by default and should normally be enabled only for the test API:

providers:
  metaname-test:
    class: octodns_metaname.MetanameProvider
    base_url: https://test.metaname.net/api/1.1
    auto_register_domains: true
    registration_term: 12

The dry-run only reports the proposed records. Registration happens during the subsequent octodns-sync --doit apply. For the production API, an additional allow_production_registration: true safeguard is required. Prefer the CLI for an explicit availability check and registration before enabling production automation.

Secret resolution

By default the provider reads secrets directly from environment variables such as METANAME_ACCOUNT_REF and METANAME_API_TOKEN. If your workflow stores values in a vault (e.g., 1Password) you can register a resolver using:

from octodns_metaname import secrets

def resolve(name: str, reference: str | None) -> str | None:
    ...

secrets.set_secret_resolver(resolve)

For CLI usage set OCTODNS_METANAME_SECRET_RESOLVER="module:function" so the resolver is loaded automatically. OpsDev.nz deployments point this at octodns_metaname.op_opsdevnz_hooks:resolve, provided by the optional onepassword extra. The adapter uses op-opsdevnz for the underlying Service Account SDK/CLI resolution.

Install the integration with:

pip install "octodns-metaname[onepassword]"

Development

# Create/update the project environment from uv.lock
uv sync --extra dev --extra onepassword

# Run tools inside the project environment
uv run ruff check src tests
uv run mypy src
uv run pytest --maxfail=1

# Build the documentation site
uv run zensical build

The onepassword extra installs the optional op-opsdevnz integration used by the Metaname secret resolver. uv run ensures commands use the project environment rather than a user-level Python installation.

The repo includes a GitHub Actions workflow that runs linting, type checking, tests, and a build on every push.

Releasing

See RELEASING.md for the full TestPyPI → PyPI checklist.

License

Apache-2.0 © OpsDev.nz

Release files for octodns-metaname 0.3.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 octodns-metaname 0.3.0
File Size Uploaded
octodns_metaname-0.3.0.tar.gz 27.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for octodns-metaname 0.3.0
File Interpreter ABI Platform
octodns_metaname-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 47.9 kB

Release files / octodns_metaname-0.3.0.tar.gz

Download URL octodns_metaname-0.3.0.tar.gz
Size 27.3 kB
Tags Source
SHA-256 checksum
How to use checksums
2ed70e064b87f56e935dff2101e69c69b6f10f870ae64e51f6ffd81fe241675b
BLAKE2b-256 checksum
How to use checksums
7ed0eb3e163d1af9835b4a292a182736fd7f870ec3344a5697405afe0126e0ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.

Transparency log

Release files / octodns_metaname-0.3.0-py3-none-any.whl

Download URL octodns_metaname-0.3.0-py3-none-any.whl
Size 20.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98c7a193348d90349182a106a808f19229608941e3c5e08820cb6f8c42d1e3b2
BLAKE2b-256 checksum
How to use checksums
b8e4f96d722266a71233024565fabd1f8f38a30ee17591dfbe5435d7a9a16d28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

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