# Path: statik/common.py
# class YamlLoadable(object):
#     """Base class for objects that can be loaded from a YAML file or a
#     YAML string, passed through to the constructor."""
# 
#     def __init__(self, filename=None, from_string=None, encoding='utf-8', error_context=None):
#         # default to UTF-8
#         self.encoding = encoding
#         self.file_content = None
#         self.error_context = error_context or StatikErrorContext()
#         self.error_context.update(filename=filename)
# 
#         if filename is not None:
#             self.filename = filename
# 
#             with open(self.filename, mode='rt', encoding=self.encoding) as f:
#                 self.file_content = f.read()
# 
#         elif from_string is not None:
#             self.filename = None
#             self.file_content = from_string
# 
#         else:
#             raise MissingParameterError("filename", "from_string")
# 
#         # load the variables from the YAML file
#         self.vars = yaml.safe_load(self.file_content) if self.file_content else {}
#         if not isinstance(self.vars, dict):
#             self.vars = {}
#         else:
#             # strip out any extra whitespace from the variables
#             self.vars = dict_strip(self.vars)
# 
# Path: statik/utils.py
# def extract_filename(path):
#     return list(os.path.splitext(os.path.basename(path)))[0]


from statik.common import YamlLoadable
from statik.fields import *
from statik.utils import extract_filename
from statik.errors import *
import logging
# -*- coding:utf-8 -*-


logger = logging.getLogger(__name__)

__all__ = [
    'StatikModel'
]



# Path: statik/common.py
# class YamlLoadable(object):
#     """Base class for objects that can be loaded from a YAML file or a
#     YAML string, passed through to the constructor."""
# 
#     def __init__(self, filename=None, from_string=None, encoding='utf-8', error_context=None):
#         # default to UTF-8
#         self.encoding = encoding
#         self.file_content = None
#         self.error_context = error_context or StatikErrorContext()
#         self.error_context.update(filename=filename)
# 
#         if filename is not None:
#             self.filename = filename
# 
#             with open(self.filename, mode='rt', encoding=self.encoding) as f:
#                 self.file_content = f.read()
# 
#         elif from_string is not None:
#             self.filename = None
#             self.file_content = from_string
# 
#         else:
#             raise MissingParameterError("filename", "from_string")
# 
#         # load the variables from the YAML file
#         self.vars = yaml.safe_load(self.file_content) if self.file_content else {}
#         if not isinstance(self.vars, dict):
#             self.vars = {}
#         else:
#             # strip out any extra whitespace from the variables
#             self.vars = dict_strip(self.vars)
# 
# Path: statik/utils.py
# def extract_filename(path):
#     return list(os.path.splitext(os.path.basename(path)))[0]


# Path: statik/models.py
from statik.common import YamlLoadable
from statik.fields import *
from statik.utils import extract_filename
from statik.errors import *
import logging

# -*- coding:utf-8 -*-


logger = logging.getLogger(__name__)

__all__ = [
    'StatikModel'
]



class StatikModel(YamlLoadable):