Skip to main content

rndc-python

Python client library for talking to ISC BIND's RNDC service.

Requirements

  • Python 3.10+

Installation

pip install rndc-python

Or using uv:

uv add rndc-python

Command-line Interface

The package includes a CLI tool rndc-python-cli:

# Using CLI options
rndc-python-cli -s 127.0.0.1 -p 953 -a sha256 -k <base64-secret> status

# Using environment variables
export RNDC_HOST=127.0.0.1
export RNDC_PORT=953
export RNDC_ALGORITHM=sha256
export RNDC_SECRET=<base64-secret>
rndc-python-cli status

# Mix of both (CLI options override env vars)
rndc-python-cli --port 954 reload

Configuration

The client can read its settings from environment variables (or a .env file):

  • RNDC_HOST
  • RNDC_PORT
  • RNDC_ALGORITHM (e.g. hmac-sha256)
  • RNDC_SECRET
  • RNDC_TIMEOUT
  • RNDC_MAX_RETRIES
  • RNDC_RETRY_DELAY

You can also configure the client directly in Python:

from rndc_python import RNDCClient, TSIGAlgorithm

client = RNDCClient(
    host="127.0.0.1",
    port=953,
    algorithm=TSIGAlgorithm.SHA256,
    secret="your-base64-secret-here",
    timeout=10,
    max_retries=3,
    retry_delay=2,
)

All parameters are optional if you have configured environment variables or a .env file.

Usage

Python API

from rndc_python import RNDCClient

with RNDCClient() as rndc_client:
    print(rndc_client.call("status"))

Development

See DEVELOPMENT.md for development setup, building, and testing instructions.

Metadata

Release files for rndc-python 0.2.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 rndc-python 0.2.0
File Size Uploaded Provenance Actions
rndc_python-0.2.0.tar.gz 13.7 kB With provenance Details for rndc_python-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rndc-python 0.2.0
File Interpreter ABI Platform Actions
rndc_python-0.2.0-py3-none-any.whl Python 3 none any Details for rndc_python-0.2.0-py3-none-any.whl

Total release size: 28.8 kB

Release files / rndc_python-0.2.0.tar.gz

Download URL rndc_python-0.2.0.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bcf7b5d569428271243f4bd5b99b5c1b2b7e395721ce8bf8a88bd1b323796cac
BLAKE2b-256 checksum
How to use checksums
6c84b15c3623393798bb43fa14776b3769d26dd1715345690867cd71181fc234
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 Sep 16, 2026.

Transparency log

Release files / rndc_python-0.2.0-py3-none-any.whl

Download URL rndc_python-0.2.0-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0dda0100a4ad68bb58d05a2ec69d76957b6db91f8b9d016486e87f089d17387e
BLAKE2b-256 checksum
How to use checksums
8b0b44054bf46f276c5cd58954e169c1ac3d3351498813b0d561245bf09bd80e
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 Sep 16, 2026.

Transparency log

Security for rndc-python 0.2.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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for rndc_python-0.2.0.tar.gz

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 Sep 16, 2026.

Transparency log

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.

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