# HG changeset patch # User Jeff Hammel # Date 1332963778 25200 # Node ID 0516a9e0566b574ab06c9da2beac1f194c2eb413 # Parent 79f2d70ed5e5ce4e1db9484a8b0286bc4373f3e7 more README hacking diff -r 79f2d70ed5e5 -r 0516a9e0566b README.txt --- a/README.txt Wed Mar 28 11:33:14 2012 -0700 +++ b/README.txt Wed Mar 28 12:42:58 2012 -0700 @@ -9,8 +9,8 @@ - you want to be able to serialize and deserialize configuration -API ---- +Basic Usage +----------- The ``configuration.Configuration`` class implements an abstract base class that extends ``optparse.OptionParser``. The form of the @@ -54,13 +54,28 @@ machine to machine) or if the configuration is overridable from the command line. -``configure`` features the ability to serialize (dump) and deserialize -(load) configuration from a pluggable set of formats. +``configuration`` features the ability to serialize (dump) and deserialize +(load) configuration from a pluggable set of formats. By default, +``--dump `` will dump the resultant configuration (that +gathered from the command line options and loaded configuration files) +to a file of format dictate by the file extension (Example: +``--dump mydumpfile.json`` will use JSON format). The flag for the +option, e.g. ``--dump``, may be set via the ``dump`` parameter to +``Configuration``'s constructor. + +``Configuration`` instances can also deserialize data. The normal case of +using configuration is when you want to be able to read from +configuration files. By default, ``Configuration`` instances read +positional arguments for configuration files to be loaded. The `configuration package `_ requires ``json``(``simplejson`` on older python) and ``PyYAML`` so these serializers/deserializers are available if you install the package. + +Extending Configuration +----------------------- + ---- Jeff Hammel