Usage
See Quickstart for getting initially setup.
Defaults
Generally when using Ordbok, these following kwargs can be supplied at initialization. However when working with Flask, initialization of the config happens internally, so a helper method app.config.update_defaults()
is provided. This must be called before app.config.load()
to have any effect.
config_dir
defaults toconfig
and looks for files in this directory relative to the current working directory (or theapp.root_dir
in Flask).custom_config_files
defaults to['config.yml', 'local_config.yml']
. If you like to change these or add more, specify them as a string of the filename here. As above, earlier files will be overridden by later files.include_env
defaults toTrue
, but if set toFalse
, the environment will not be checked by theconfig.load()
method.namespace
is used to avoid conflicts of real configuration values and defaults to'ordbok'
. (If you override this, you'll want to avoid using something like'flask'
or'app'
.)default_environment
defaults todevelopment
. Ifconfig['ENVIRONMENT']
is unset, we look in the environment forORDBOK_ENVIRONMENT
. If this is unset, thedefault_environment
is used.