The command-line

One of the nicest things about configglue is its ability to easily integrate the command line for specifying or overriding configuration values.

In the example given in the quickstart guide, it can be seen how the command line is used to supply the value of a configuration option.

Top-level configuration options are matched using the simple



Options that are within a section will be matched using the compound


syntax; therefore it’s not possible to have a section or option name contain underscore characters, as they would clash with the command line argument name resolution method.

Short-form names

If the Option has a non-empty short_name set, this will be used as the short-form name for the command line parameter. For example, given the schema

class MySchema(schema.Schema):
    foo = IntOption(short_name='f')

the following forms of specifying a value for this option are equivalent:



-f 1

Environment variables

Environment variables can be used for overriding configuration options. For more information, see the documentation about Environment variables during command-line integration.