Pi-hole provider for octoDNS
An octoDNS provider that targets Pi-hole. Uses the pihole6api library for API communication.
Pi-hole version 6 is supported.
This provider manages matching A/AAAA/CNAME records with Pi-hole's
Local DNS Records. It will manage host and CNAME entries that match
domain names under management by OctoDNS. Other existing Pi-hole entries are
untouched.
TTL values are unsupported on host records (A/AAAA). CNAME records support an optional TTL.
Installation
pip install octodns-pihole
Configuration
providers:
pihole:
class: octodns_pihole.PiholeProvider
url: https://pihole.lan:443
password: env/PIHOLE_PASSWORD
strict_supports: false # ignore unsupported records
Support Information
Records
Pi-hole supports A, AAAA, and CNAME. PTR records will automatically exist for A and AAAA records.
Dynamic
PiholeProvider does not support dynamic records.
Development
# Install in editable mode with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest --disable-network
# Run tests with coverage
pytest --disable-network --cov=octodns_pihole --cov-report=term-missing
# Lint
pyflakes octodns_pihole/*.py tests/*.py
# Format
isort octodns_pihole/ tests/
black octodns_pihole/ tests/
There is a docker-compose.yml file included in the repo
that will set up a Pi-hole server with the API enabled for use in development.
The admin password/api-key for it is correct horse battery staple.
A configuration example is provided and can be used along with the docker-compose.yml:
-
Launch the container.
docker compose up- Admin UI: http://localhost/admin
- API Docs: http://localhost/api/docs
-
Run octodns-sync against the container
octodns-sync --config-file=./example/config.yaml -
Synchronize changes with Pi-hole
octodns-sync --config-file=./example/config.yaml --doit -
View records within the admin UI: Local DNS Records
Metadata
Release files for octodns-pihole 0.1.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_pihole-0.1.0.tar.gz | 6.7 kB | With provenance | Details for octodns_pihole-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| octodns_pihole-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for octodns_pihole-0.1.0-py3-none-any.whl |
Total release size: 11.9 kB
Release files / octodns_pihole-0.1.0.tar.gz
| Download URL | octodns_pihole-0.1.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d08c671d8c9b63a1b97ac1a8470a430a6923557016c07c3310e6aaf0c27ad777
|
|
BLAKE2b-256 checksum How to use checksums |
0e1814779acb52012104757f66143b0c1e9144436c06742ac4a9ec297e9716ad
|
| 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 Feb 11, 2026.
Transparency logRelease files / octodns_pihole-0.1.0-py3-none-any.whl
| Download URL | octodns_pihole-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
920cc221f3d27a752a844302ddfe66a515d18447ed5beefcdad620e8ea90a6ea
|
|
BLAKE2b-256 checksum How to use checksums |
bd88179fb8e71c53ebc08467537857467c94748f8844671f35652abb53f3b939
|
| 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 Feb 11, 2026.
Transparency logSecurity for octodns-pihole 0.1.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.
Attestation for octodns_pihole-0.1.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 Feb 11, 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.