<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>bicop</name>
<shortdesc>Read bind-style configuration files</shortdesc>
<description>Introduction
============

*bicop* is a python library to process ISC bind-style configuration files.
These are nested structures that look like this::

    datasource1 {
        server     "server1.your.domain";
        username   "client";
        password   "secret";
        extra {
            isolation "full";
        };
    };

    tables {
        "users";
        "groups";
    };


Parsing
=======

Parsing is trivial using the ''parse'' method::

   from bicop import parse
   parse("/etc/bind/named.conf")

This returns a standard python dictionary with all data read from the
file. Entries in the dictionary can be other dictionaries or lists.


Merging
=======

A common need is to be able to support default values for configurations
or to handle configuration at multiple levels with priorities, for example
a uer configuration overriding entries from the system-wide configuration.
To support this bicop has a utility method that can merge dictionaries. You
can use it like this::

  from bicop import parse
  from bicop import merge

  configuration=parse("/etc/application.conf")
  userconfig=parse("/home/user/.application")
  merge(configuration, userconfig, overwrite=True)


Easy access for nested dictionaries
===================================

Configuration files in this format can have deeply nested structures. Accessing
those using standard python dictionaries is a slightly cumbersone. To make
this a bit more pleasant on the eyes you can use the NestedDict wrapper::

  from bicop import parse
  from bicop import NestedDict

  configuration=NestedDict(parse("/etc/application.conf"))
  print "Your signature is: %s" % configuration["profiles/user/signature"]</description>
<maintainer><foaf:Person><foaf:name>Wichert Akkerman - Simplon</foaf:name>
<foaf:mbox_sha1sum>da26afb14d62ed12e462ce3a9d6c0df42aa616f8</foaf:mbox_sha1sum></foaf:Person></maintainer>
<release><Version><revision>1.0rc1</revision></Version></release>
</Project></rdf:RDF>