Skip to main content

Read name-daemon configuration files like the bind

Project description

[![Build Status](](

# namedparser

Read name-daemon configuration files like the bind

# Installation

$ pip install

# Example

from namedparser import Parser

txt = '''
options {
directory "/var/na/named";
check-names master ignore;
check-names slave ignore;
check-names response ignore;
allow-recursion {
allow-query {
allow-query-cache {
allow-transfer {; };
max-cache-ttl 3600000;
min-retry-time 50;
max-acache-size 4M;
max-cache-size 4M;
max-journal-size 100k;
version "";

result = Parser.parse_string(txt)
options ='options')
check_names = options[0].search('check-names')
assert check_names[0].target == 'master'
assert check_names[1].target == 'slave'
assert check_names[2].target == 'response'

directory = options[0].search('directory')[0]
assert directory.value == '/var/na/named'
assert str(directory) == 'directory "/var/na/named";'

You may get more information how to acceess some nodes in `named.conf`, if you read test code in `namedparser/testsuite/`.

# Support

You may run on

- 2.6
- 2.7
- 3.*

Project details

Download files

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

Files for namedparser, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size namedparser-0.0.1.tar.gz (5.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page