# Path: marvin_python_toolbox/management/templates/python-engine/project_package/_compatibility.py

# 
# Path: marvin_python_toolbox/management/templates/python-engine/project_package/_logging.py
# def get_logger(name, namespace='{{project.package}}',
#                log_level=DEFAULT_LOG_LEVEL, log_dir=DEFAULT_LOG_DIR):
#     """Build a logger that outputs to a file and to the console,"""
# 
#     log_level = (os.getenv('{}_LOG_LEVEL'.format(namespace.upper())) or
#                  os.getenv('LOG_LEVEL', log_level))
#     log_dir = (os.getenv('{}_LOG_DIR'.format(namespace.upper())) or
#                os.getenv('LOG_DIR', log_dir))
# 
#     logger = logging.getLogger('{}.{}'.format(namespace, name))
#     logger.setLevel(log_level)
# 
#     formatter = logging.Formatter(
#         '%(asctime)s - %(name)s - %(levelname)s - %(message)s')
# 
#     # Create a console stream handler
#     console_handler = logging.StreamHandler()
#     console_handler.setLevel(log_level)
#     console_handler.setFormatter(formatter)
#     logger.addHandler(console_handler)
# 
#     try:
#         if log_dir:
#             log_path = os.path.abspath(log_dir)
#             log_filename = '{name}.{pid}.log'.format(
#                 name=namespace, pid=os.getpid())
# 
#             file_path = str(os.path.join(log_path, log_filename))
# 
#             if not os.path.exists(log_path):
#                 os.makedirs(log_path, mode=774)
# 
#             # Create a file handler
#             file_handler = logging.FileHandler(file_path)
#             file_handler.setLevel(log_level)
#             file_handler.setFormatter(formatter)
#             logger.addHandler(file_handler)
#     except OSError as e:
#         logger.error('Could not create log file {file}: {error}'.format(
#             file=file_path, error=e.strerror))
# 
#     return logger
# 
# Path: marvin_python_toolbox/engine_base/engine_base_data_handler.py
# class EngineBaseDataHandler(EngineBaseBatchAction):
#     __metaclass__ = ABCMeta
# 
#     _initial_dataset = None
#     _dataset = None
# 
#     def __init__(self, **kwargs):
#         self._initial_dataset = self._get_arg(kwargs=kwargs, arg='initial_dataset')
#         self._dataset = self._get_arg(kwargs=kwargs, arg='dataset')
#         super(EngineBaseDataHandler, self).__init__(**kwargs)
# 
#     @property
#     def marvin_initial_dataset(self):
#         return self._load_obj(object_reference='_initial_dataset')
# 
#     @marvin_initial_dataset.setter
#     def marvin_initial_dataset(self, initial_dataset):
#         self._save_obj(object_reference='_initial_dataset', obj=initial_dataset)
# 
#     @property
#     def marvin_dataset(self):
#         return self._load_obj(object_reference='_dataset')
# 
#     @marvin_dataset.setter
#     def marvin_dataset(self, dataset):
#         self._save_obj(object_reference='_dataset', obj=dataset)


from .._compatibility import six
from .._logging import get_logger
from marvin_python_toolbox.engine_base import EngineBaseDataHandler
#!/usr/bin/env python
# coding=utf-8

"""AcquisitorAndCleaner engine action.

Use this module to add the project main code.
"""



__all__ = ['AcquisitorAndCleaner']


logger = get_logger('acquisitor_and_cleaner')



# Path: marvin_python_toolbox/management/templates/python-engine/project_package/_compatibility.py

# 
# Path: marvin_python_toolbox/management/templates/python-engine/project_package/_logging.py
# def get_logger(name, namespace='{{project.package}}',
#                log_level=DEFAULT_LOG_LEVEL, log_dir=DEFAULT_LOG_DIR):
#     """Build a logger that outputs to a file and to the console,"""
# 
#     log_level = (os.getenv('{}_LOG_LEVEL'.format(namespace.upper())) or
#                  os.getenv('LOG_LEVEL', log_level))
#     log_dir = (os.getenv('{}_LOG_DIR'.format(namespace.upper())) or
#                os.getenv('LOG_DIR', log_dir))
# 
#     logger = logging.getLogger('{}.{}'.format(namespace, name))
#     logger.setLevel(log_level)
# 
#     formatter = logging.Formatter(
#         '%(asctime)s - %(name)s - %(levelname)s - %(message)s')
# 
#     # Create a console stream handler
#     console_handler = logging.StreamHandler()
#     console_handler.setLevel(log_level)
#     console_handler.setFormatter(formatter)
#     logger.addHandler(console_handler)
# 
#     try:
#         if log_dir:
#             log_path = os.path.abspath(log_dir)
#             log_filename = '{name}.{pid}.log'.format(
#                 name=namespace, pid=os.getpid())
# 
#             file_path = str(os.path.join(log_path, log_filename))
# 
#             if not os.path.exists(log_path):
#                 os.makedirs(log_path, mode=774)
# 
#             # Create a file handler
#             file_handler = logging.FileHandler(file_path)
#             file_handler.setLevel(log_level)
#             file_handler.setFormatter(formatter)
#             logger.addHandler(file_handler)
#     except OSError as e:
#         logger.error('Could not create log file {file}: {error}'.format(
#             file=file_path, error=e.strerror))
# 
#     return logger
# 
# Path: marvin_python_toolbox/engine_base/engine_base_data_handler.py
# class EngineBaseDataHandler(EngineBaseBatchAction):
#     __metaclass__ = ABCMeta
# 
#     _initial_dataset = None
#     _dataset = None
# 
#     def __init__(self, **kwargs):
#         self._initial_dataset = self._get_arg(kwargs=kwargs, arg='initial_dataset')
#         self._dataset = self._get_arg(kwargs=kwargs, arg='dataset')
#         super(EngineBaseDataHandler, self).__init__(**kwargs)
# 
#     @property
#     def marvin_initial_dataset(self):
#         return self._load_obj(object_reference='_initial_dataset')
# 
#     @marvin_initial_dataset.setter
#     def marvin_initial_dataset(self, initial_dataset):
#         self._save_obj(object_reference='_initial_dataset', obj=initial_dataset)
# 
#     @property
#     def marvin_dataset(self):
#         return self._load_obj(object_reference='_dataset')
# 
#     @marvin_dataset.setter
#     def marvin_dataset(self, dataset):
#         self._save_obj(object_reference='_dataset', obj=dataset)


# Path: marvin_python_toolbox/management/templates/python-engine/project_package/data_handler/acquisitor_and_cleaner.py
from .._compatibility import six
from .._logging import get_logger
from marvin_python_toolbox.engine_base import EngineBaseDataHandler

#!/usr/bin/env python
# coding=utf-8

"""AcquisitorAndCleaner engine action.

Use this module to add the project main code.
"""



__all__ = ['AcquisitorAndCleaner']


logger = get_logger('acquisitor_and_cleaner')



class AcquisitorAndCleaner(EngineBaseDataHandler):