Not Logged In

setoptconf 0.1.0

setoptconf is a Python library that can be used to retrieve program settings
from a variety of common sources:

Command Line

Environment Variables

INI Files

JSON Files

YAML Files

Python Objects/Modules

The goal of this project is to define your desired settings in a simple and
consistent way, and then point setoptconf at as many of the sources as you’d
like to use, and let it comb them all, looking for your settings.

This README is admittedly very light on details. Full documentation will come
in time. For now, here’s an example of its use:

Retreive the settings from our desired sources, combining the settings and
overriding with the priority implied by the order of the sources we pass:

config = manager.retrieve(
# This source pulls from the command line using argparse.
soc.CommandLineSource,
# This source pulls from environment variables that are prefixed
# with MYPROGRAM_*
soc.EnvironmentVariableSource,
# This source pulls from the named INI files. It stops at the first
# file it finds.
soc.ConfigFileSource(('.myprogramrc', '/etc/myprogram.conf')),
)

We now have a Configuration object named config that has three attributes;
foo, bar, and baz.