Skip to main content

Bind9 configuration file parsing module

Project description

bind9-parser reads ISC config files and produces a (massive) Pythonized Dict/List containing all of its configuration settings.

bind9-parser

I needed a parser in Python that can handle ISC Bind configuration file.

Why Did I Do This?

I see lots of Python scripts for ISC Bind Zone files, but not its configuration.

The closest cousin of Bind configuration format is NGINX config.

The closest Python (and configuration file parser) I could find was liuyangc3/nginx_config_parser on GitHub here.

On GitHub, I have found lots of generator, beautifier, lint, builder, change detector for Bind9, but no really good parser for Bind9 configuration file.

I built a complete parser that will work on version 4.9 to 9.15. Why did I name it Bind9-parser? Because I started out only to cover Bind version 9.0 to 9.15. I later expanded it to cover 4.9 on up.

Features

Features:

  • 'include' statements are also supported (my favorite)
  • Relative directory support (not stuck on /etc/bind or /var/lib/bind)
    • Useful for testing many config files in their respective local subdirectory(s).
  • Support for Bind 4.8 to v9.15.1 (working on Bind10)
  • ISC config files are used in ISC Bind9 server, as well as both ISC DHCP server and client.

bind9-parser make it so easy to do all of that, and now easier for you.

An example Bind9 config file that contains:

    options {
        version "4.1";
        recursion no;
    }

bind9-parser result is:

    result = { 'options': { 'version': "4.1", 'recursion': 'no' }}

Unit Tests

A massive unit test is supplied (under tests/ subdirectory) to ensure that future breakage does not occur.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bind9_parser-0.9.8.tar.gz (48.3 kB view details)

Uploaded Source

Built Distributions

bind9_parser-0.9.8-py3.7.egg (103.7 kB view details)

Uploaded Egg

bind9_parser-0.9.8-py2.7.egg (96.4 kB view details)

Uploaded Egg

File details

Details for the file bind9_parser-0.9.8.tar.gz.

File metadata

  • Download URL: bind9_parser-0.9.8.tar.gz
  • Upload date:
  • Size: 48.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.3

File hashes

Hashes for bind9_parser-0.9.8.tar.gz
Algorithm Hash digest
SHA256 3208e0af244e3f24d401ecfe0a6e0772fe54d8b18ede7be9dfc3dd046b039856
MD5 a7a60c29092927c12c42a16862b397a2
BLAKE2b-256 68aa3d7b0d2a16616b41e785bff058728a30dfbafa29ae736f9d69880cf90bb6

See more details on using hashes here.

File details

Details for the file bind9_parser-0.9.8-py3.7.egg.

File metadata

  • Download URL: bind9_parser-0.9.8-py3.7.egg
  • Upload date:
  • Size: 103.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.3

File hashes

Hashes for bind9_parser-0.9.8-py3.7.egg
Algorithm Hash digest
SHA256 ac0c30aeca9137f528cadff88ced487f20878eaf96dac412d55cd20217f69a4b
MD5 97e21479b7460f328be4567736bf0253
BLAKE2b-256 2fa87165d5f15d2eff08433c52be8cb8e49e964e3e2005a20a4b95832379115c

See more details on using hashes here.

File details

Details for the file bind9_parser-0.9.8-py2.7.egg.

File metadata

  • Download URL: bind9_parser-0.9.8-py2.7.egg
  • Upload date:
  • Size: 96.4 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.3

File hashes

Hashes for bind9_parser-0.9.8-py2.7.egg
Algorithm Hash digest
SHA256 7ad4d045cf6c6f7dc1eb4c744c9705d60ae01c0f742f89d9950b598f45371f10
MD5 72505b4c63a21b2b263f6a23e101de91
BLAKE2b-256 f47df2fb08d0a8539fa7babfa463275ab36dbb847516c131abe1e02436719923

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page