mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-10 08:38:28 +00:00
43 lines
876 B
Python
43 lines
876 B
Python
|
#!/usr/bin/env python3
|
||
|
# -*-coding:UTF-8 -*
|
||
|
"""
|
||
|
Importer Class
|
||
|
================
|
||
|
|
||
|
Import Content
|
||
|
|
||
|
"""
|
||
|
import os
|
||
|
import sys
|
||
|
|
||
|
from abc import ABC, abstractmethod
|
||
|
|
||
|
|
||
|
# sys.path.append(os.environ['AIL_BIN'])
|
||
|
##################################
|
||
|
# Import Project packages
|
||
|
##################################
|
||
|
# from ConfigLoader import ConfigLoader
|
||
|
|
||
|
class AbstractImporter(ABC):
|
||
|
def __init__(self):
|
||
|
"""
|
||
|
Init Module
|
||
|
importer_name: str; set the importer name if different from the instance ClassName
|
||
|
"""
|
||
|
# Module name if provided else instance className
|
||
|
self.name = self._name()
|
||
|
|
||
|
@abstractmethod
|
||
|
def importer(self, *args, **kwargs):
|
||
|
"""Importer function"""
|
||
|
pass
|
||
|
|
||
|
def _name(self):
|
||
|
"""
|
||
|
Returns the instance class name (ie. the Exporter Name)
|
||
|
"""
|
||
|
return self.__class__.__name__
|
||
|
|
||
|
|