Skip to main content

do-dns-manager pypi

A DNS record manager using DigitalOcean as backend, with its own authentication. Best suited when you just need something that changes the DNS, but you don’t want it to have access to other APIs, for example, APIs that can cost you money.

I find this particularly useful for assigning DNS records in a DHCP lease hook. An example hook is included as dnsmasq-hook for dnsmasq users.

Installation

pip install do-dns-manager

Configuration

Create htpasswd.txt somewhere containing lines of username and password pairs separated by :, for example:

spam:password
ham:hunter2

We will call this file $HTPASSWD.

Run the DNS manager as follows:

DIGITAL_OCEAN_API_KEY='(api key)' do-dns-manager --domain=example.com --keyfile=$HTPASSWD --port=8888 --address=127.0.0.1

Change (api key), example.com, $HTPASSWD, 8888 and 127.0.0.1 to fit your situation.

We will use curl examples:

# Add A record for spam.example.com
curl -u 'spam:password' http://127.0.0.1:8888 -d @- <<EOF
{"op": "add", "address": "127.0.0.1", "domain": "spam"}
EOF

# Add AAAA record for spam.example.com
curl -u 'spam:password' http://127.0.0.1:8888 -d @- <<EOF
{"op": "add", "address": "::1", "domain": "spam"}
EOF

# Remove A record for spam.example.com
curl -u 'spam:password' http://127.0.0.1:8888 -d @- <<EOF
{"op": "del", "address": "127.0.0.1", "domain": "spam"}
EOF

# Remove AAAA record for spam.example.com
# Using "address": "::1" instead of "type": "AAAA" also works
curl -u 'spam:password' http://127.0.0.1:8888 -d @- <<EOF
{"op": "del", "type": "AAAA", "domain": "spam"}
EOF

Metadata

Release files for do-dns-manager 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for do-dns-manager 0.1
File Size Uploaded Provenance Actions
do-dns-manager-0.1.tar.gz 17.7 kB Without provenance Details for do-dns-manager-0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for do-dns-manager 0.1
File Interpreter ABI Platform Actions
do_dns_manager-0.1-py3-none-any.whl Python 3 none any Details for do_dns_manager-0.1-py3-none-any.whl

Total release size: 25.3 kB

Release files / do-dns-manager-0.1.tar.gz

Download URL do-dns-manager-0.1.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8ce3b379e61aa7db0b94c9b5ffb783986d7fc0f65cdf21d4e86b765a53a5b6d1
BLAKE2b-256 checksum
How to use checksums
95f05db4262313398a4da1d1cd35888575746d11d26ef7e1c7df43fc3c0d643c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / do_dns_manager-0.1-py3-none-any.whl

Download URL do_dns_manager-0.1-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7c963117d80b1f765bd9d5b57e930b898a656722031f29a14d44f589becf76c
BLAKE2b-256 checksum
How to use checksums
4450d20d1d09b503c769d3cc2093225a33f1c70f8b19c3f0d1c72f1b82b5d5bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for do-dns-manager 0.1

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.

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files No provenance

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