# namedparser
Read name-daemon configuration files like the bind
# Installation
```bash
$ pip install https://github.com/hachibeeDI/namedparser/archive/master.zip
```
# Example
```python
from namedparser import Parser
txt = '''
options {
directory "/var/na/named";
check-names master ignore;
check-names slave ignore;
check-names response ignore;
allow-recursion {
any;
};
allow-query {
any;
};
allow-query-cache {
any;
};
allow-transfer { 127.0.0.1; };
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 = result.search('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/test_parser.py`.
# Support
You may run on
- 2.6
- 2.7
- 3.*
Metadata
Release files for namedparser 0.0.3
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 |
|---|---|---|---|---|
| namedparser-0.0.3.tar.gz | 7.7 kB | Without provenance | Details for namedparser-0.0.3.tar.gz |
Release files / namedparser-0.0.3.tar.gz
| Download URL | namedparser-0.0.3.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa76a45f719c4444e102132b9b7b9cc73343553f8869c8927ba57f33b5f50aa6
|
|
BLAKE2b-256 checksum How to use checksums |
76e3f96c47e30aab88d216b064d173323daa8aa385a2fc288a76bc7dd554770b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for namedparser 0.0.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.