flask_waffleconf.models

class flask_waffleconf.models.WaffleMixin

Bases: object

Mixin used in the creation of the database model.

WaffleConf expects a model that has (at least) the following fields:

  • key (str): Unique identifier for configuration variable.
  • value (str): Value for the configuration variable.

Values may be a large string, so make sure to define a field capable of storing big strings. These values are later parsed according to the type specified in the application configuration.

get_key()

Obtain the key for the configuration variable.

Mixin expects a self.key attribute (str) in the model. If this is not the case, you should override this method.

Returns:Configuration key string.
get_value()

Obtain the value for the configuration variable.

Mixin expects a self.value attribute (str) in the model. If this is not the case, you should override this method.

Returns:Configuration value string.