# Path: lcopt/data_store.py
# class LcoptStorage():
#     def __init__(self):
#     def load_config(self):
#     def refresh(self):
#     def write_default_config(self):
#     def write_config(self, config):
#     def models(self):
#     def search_indices(self):
#     def project_type(self):
#     def single_project_name(self):
#     def ecoinvent_version(self):
#     def ecoinvent_system_model(self):
#     def save_option(self):


from .data_store import storage
        from .settings_gui import FlaskSettingsGUI
import yaml
import types


ALLOWED_TYPES = [str, bool, int, float]

class SettingsDict(object):
    
    _allowed_types = tuple([types.MethodType, tuple] + ALLOWED_TYPES)

    def __init__(self, contents, write_function, **kwargs):

        self._autowrite = False # disable autowriting for initialisation
        
        self.write = write_function # set the write function to the callback from the parent instantiation

        self._allowed_types = tuple(ALLOWED_TYPES)

        for k, v in contents.items(): # write the contents of the config dict to the SettingsDict
            setattr(self, k, str(v))

        self._autowrite = kwargs.get('autowrite', True) # set the autowrite attribute (default is True)

        

    def __repr__(self):


# Path: lcopt/data_store.py
# class LcoptStorage():
#     def __init__(self):
#     def load_config(self):
#     def refresh(self):
#     def write_default_config(self):
#     def write_config(self, config):
#     def models(self):
#     def search_indices(self):
#     def project_type(self):
#     def single_project_name(self):
#     def ecoinvent_version(self):
#     def ecoinvent_system_model(self):
#     def save_option(self):


# Path: lcopt/settings.py
from .data_store import storage
        from .settings_gui import FlaskSettingsGUI
import yaml
import types



ALLOWED_TYPES = [str, bool, int, float]

class SettingsDict(object):
    
    _allowed_types = tuple([types.MethodType, tuple] + ALLOWED_TYPES)

    def __init__(self, contents, write_function, **kwargs):

        self._autowrite = False # disable autowriting for initialisation
        
        self.write = write_function # set the write function to the callback from the parent instantiation

        self._allowed_types = tuple(ALLOWED_TYPES)

        for k, v in contents.items(): # write the contents of the config dict to the SettingsDict
            setattr(self, k, str(v))

        self._autowrite = kwargs.get('autowrite', True) # set the autowrite attribute (default is True)

        

    def __repr__(self):


        string = "Lcopt settings section with the following entries:\n\n"