SettingRegistry#

class glue.config.SettingRegistry[source]#

Bases: DictRegistry

Stores key/value settings that code can use to customize Glue

Each member is a tuple of 3 items:
  • key: the setting name [str]

  • value: the default setting [object]

  • validator: A function which tests whether the input is a valid value,

    and raises a ValueError if invalid. On valid input, returns the (possibly sanitized) setting value.

Methods Summary

add(key[, default, validator])

Add a new item to the registry.

is_default(setting)

reset_defaults()

Methods Documentation

add(key, default=None, validator=None)[source]#

Add a new item to the registry.

is_default(setting)[source]#
reset_defaults()[source]#