# Path: torext/utils.py
# class SingletonMixin(object):
#     """Globally hold one instance class
# 
#     Usage:
#     >>> class SpecObject(SingletonMixin):
#     ...     pass
# 
#     >>> ins = SpecObject.instance()
#     """
#     @classmethod
#     def instance(cls, *args, **kwgs):
#         """Will be the only instance"""
#         if not hasattr(cls, "_instance"):
#             cls._instance = cls(*args, **kwgs)
#         return cls._instance
# 
# Path: torext/errors.py
# class SettingsError(TorextException):
#     pass
# 
# Path: torext/log.py
# def set_loggers(loggers):
#     for name, config in loggers.items():
#         set_logger(name, **config)


from torext.utils import SingletonMixin
from torext.errors import SettingsError
from torext.log import set_loggers
        from torext import base_settings
        Setting definitions in base_settings are indispensable
        """
        self._callbacks = {}
        self.add_key_callback('LOGGERS', set_loggers)


        for i in dir(base_settings):
            if not i.startswith('_'):
                self[i] = getattr(base_settings, i)

        self._module = None

    def __getattr__(self, key):
        try:
            return self[key]
        except KeyError:
            raise AttributeError('Has no attribute %s' % key)

    def __getitem__(self, key):
        try:
            return super(Settings, self).__getitem__(key)
        except KeyError:
            try:
                return super(Settings, self).__getitem__(key.lower())
            except KeyError:
                raise SettingsError('Key "%s" is not defined in settings' % key)

    def __setitem__(self, key, value):
        for i in key:
            if i != i.upper():

# Path: torext/utils.py
# class SingletonMixin(object):
#     """Globally hold one instance class
# 
#     Usage:
#     >>> class SpecObject(SingletonMixin):
#     ...     pass
# 
#     >>> ins = SpecObject.instance()
#     """
#     @classmethod
#     def instance(cls, *args, **kwgs):
#         """Will be the only instance"""
#         if not hasattr(cls, "_instance"):
#             cls._instance = cls(*args, **kwgs)
#         return cls._instance
# 
# Path: torext/errors.py
# class SettingsError(TorextException):
#     pass
# 
# Path: torext/log.py
# def set_loggers(loggers):
#     for name, config in loggers.items():
#         set_logger(name, **config)


# Path: torext/make_settings.py
from torext.utils import SingletonMixin
from torext.errors import SettingsError
from torext.log import set_loggers
        from torext import base_settings

        Setting definitions in base_settings are indispensable
        """
        self._callbacks = {}
        self.add_key_callback('LOGGERS', set_loggers)


        for i in dir(base_settings):
            if not i.startswith('_'):
                self[i] = getattr(base_settings, i)

        self._module = None

    def __getattr__(self, key):
        try:
            return self[key]
        except KeyError:
            raise AttributeError('Has no attribute %s' % key)

    def __getitem__(self, key):
        try:
            return super(Settings, self).__getitem__(key)
        except KeyError:
            try:
                return super(Settings, self).__getitem__(key.lower())
            except KeyError:
                raise SettingsError('Key "%s" is not defined in settings' % key)

    def __setitem__(self, key, value):
        for i in key:
            if i != i.upper():

                raise SettingsError('Key "%s" is not allowed, you should always define'