Python console for unbound server
Table of contents
- Installation
- Remote Control on Unbound
- Execute command
- Loading zone from YAML file
- Loading zone from "LocalZone" object
- Execute bulk command
Installation
This module can be installed from pypi website.
This command will install the module with yaml support for loading zone data.
pip install unbound_console[yaml]
If loading a zone using yaml is not required use the following command, zone data can instead be loaded through the LocalZone object:
pip install unbound_console
Remote Control on Unbound
Before to use this utility. You must activate the remote control on your unbound server. See config file example.
Execute command
You can execute commands with the function send_command. See nlnetlabs documentations for the full list of available commands.
- Import the module in your code
from unbound_console import RemoteControl
An asyncio implementation is available, use
RemoteControlAsyncinstead.
- Configure the remote control client with tls support. You can also provide a unix socket
unix_sock="/var/run/unbound-console.sock".
rc = RemoteControl(host="127.0.0.1", port=8953,
server_cert = "/etc/unbound/unbound_server.pem",
client_cert= "/etc/unbound/unbound_control.pem",
client_key= "/etc/unbound/unbound_control.key")
- Execute a command and get output
o = rc.send_command(cmd="status")
print(o)
Loading zone from YAML file
YAML zone definition example:
This requires installing unbound_console with yaml support
zone:
name: home.
type: static
records:
- "router.home. 86400 IN A 192.168.0.1"
- "192.168.0.1 86400 IN PTR router.test."
Call load_zone with the yaml file to load-it in your unbound server.
o = rc.load_zone(zone_data='<yaml content>')
print(o)
Loading zone from "LocalZone" object
Example loading from a LocalZone object:
from unbound_console import LocalZone
zone = LocalZone(
name="home",
type="static",
records=[
"router.home. 86400 IN A 192.168.0.1",
"192.168.0.1 86400 IN PTR router.test.",
],
)
o = rc.load_zone(zone_data=zone)
print(o)
Execute bulk command
domains_bulk = []
domains_bulk.append( "www.google.com always_nxdomain")
o = rc.send_command(cmd="local_zones", data_list=domains_bulk)
print(o)
Metadata
Release files for unbound-console 0.6.6
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 |
|---|---|---|---|---|
| unbound_console-0.6.6.tar.gz | 7.2 kB | With provenance | Details for unbound_console-0.6.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| unbound_console-0.6.6-py3-none-any.whl | Python 3 | none | any | Details for unbound_console-0.6.6-py3-none-any.whl |
Total release size: 15.0 kB
Release files / unbound_console-0.6.6.tar.gz
| Download URL | unbound_console-0.6.6.tar.gz |
|---|---|
| Size | 7.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d4e69b0479ae0347dce29a01cf7b41cd229374e0d268378f6e95f266d3fb541
|
|
BLAKE2b-256 checksum How to use checksums |
be5d9650647e3c9a3b4476779875cfbc94215eca29f66bf552a62188a7c624b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 8, 2026.
Transparency logRelease files / unbound_console-0.6.6-py3-none-any.whl
| Download URL | unbound_console-0.6.6-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6aa4669d4e522bfa6dadb63d9f6a921d44f0a0b938c3ea2e2300223e280f70dd
|
|
BLAKE2b-256 checksum How to use checksums |
7cc9b90355e2a40c8461ada5861096d358a5e3301135bca06313f7a8f841f139
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 8, 2026.
Transparency logSecurity for unbound-console 0.6.6
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
Both files in this release have been uploaded with provenance metadata.
Attestation for unbound_console-0.6.6.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 Jan 8, 2026.
Transparency logA 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.