Esempio n. 1
0
 def __init__(self, db_type,
              parser_library=None, renderer_library=None,
              **keywords):
     self.__db_type = db_type
     self.__parser_library = parser_library
     self.__renderer_library = renderer_library
     AbstractSource.__init__(self, **keywords)
Esempio n. 2
0
    def __init__(self, file_name=None, renderer_library=None, **keywords):
        AbstractSource.__init__(self, **keywords)
        self._file_name = file_name

        self.__file_type = _find_file_type_from_file_name(file_name, 'write')
        self._renderer = RENDERER.get_a_plugin(self.__file_type,
                                               renderer_library)
Esempio n. 3
0
    def __init__(
        self,
        column_names,
        query_sets,
        sheet_name=None,
        row_renderer=None,
        start_row=0,
        row_limit=-1,
        start_column=None,
        column_limit=None,
        skip_row_func=None,
        skip_column_func=None,
        **keywords
    ):
        self.__sheet_name = sheet_name
        if self.__sheet_name is None:
            self.__sheet_name = constants.DEFAULT_SHEET_NAME
        self.__column_names = column_names
        self.__query_sets = query_sets
        self.__row_renderer = row_renderer
        self.__start_row = start_row
        self.__row_limit = row_limit
        self.__skip_row_func = skip_row_func

        if start_column is None:
            print("start_column is ignored")
        if column_limit is None:
            print("column_limit is ignored")
        if skip_column_func is None:
            print("skip_column_func is ignored")
        AbstractSource.__init__(self, **keywords)
Esempio n. 4
0
    def __init__(self, file_name=None, renderer_library=None, **keywords):
        AbstractSource.__init__(self, **keywords)
        self._file_name = file_name

        self.__file_type = find_file_type_from_file_name(file_name, 'write')
        self._renderer = RENDERER.get_a_plugin(
            self.__file_type, renderer_library)
Esempio n. 5
0
 def __init__(self, adict, with_keys=True, sheet_name=DEFAULT_SHEET_NAME,
              **keywords):
     self.__adict = adict
     self.__with_keys = with_keys
     self._content = _FakeIO()
     self.__sheet_name = sheet_name
     AbstractSource.__init__(self, **keywords)
Esempio n. 6
0
 def __init__(
     self, adict, with_keys=True, sheet_name=DEFAULT_SHEET_NAME, **keywords
 ):
     self.__adict = adict
     self.__with_keys = with_keys
     self._content = _FakeIO()
     self.__sheet_name = sheet_name
     AbstractSource.__init__(self, **keywords)
Esempio n. 7
0
 def __init__(self,
              db_type,
              parser_library=None,
              renderer_library=None,
              **keywords):
     self.__db_type = db_type
     self.__parser_library = parser_library
     self.__renderer_library = renderer_library
     AbstractSource.__init__(self, **keywords)
Esempio n. 8
0
    def __init__(self, file_name=None, parser_library=None, **keywords):
        self.__file_name = file_name

        if "force_file_type" in keywords:
            file_type = keywords.get("force_file_type")
        else:
            file_type = self.__file_name.split(".")[-1]
        self.__parser = PARSER.get_a_plugin(file_type, parser_library)
        AbstractSource.__init__(self, **keywords)
Esempio n. 9
0
 def __init__(self, db_type, export_columns=None,
              sheet_name=None,
              parser_library=None, renderer_library=None,
              **keywords):
     self._db_type = db_type
     self.__export_columns = export_columns
     self.__sheet_name = sheet_name
     self.__parser_library = parser_library
     self.__renderer_library = renderer_library
     AbstractSource.__init__(self, **keywords)
    def __init__(self, file_name=None, renderer_library=None, **keywords):
        AbstractSource.__init__(self, **keywords)
        self._file_name = file_name

        if "force_file_type" in keywords:
            file_type = keywords.get("force_file_type")
        else:
            file_type = find_file_type_from_file_name(file_name, "write")

        self._renderer = RENDERER.get_a_plugin(file_type, renderer_library)
    def __init__(self, file_type=None, file_stream=None,
                 renderer_library=None, **keywords):
        AbstractSource.__init__(self, **keywords)

        self._renderer = RENDERER.get_a_plugin(file_type, renderer_library)
        if file_stream:
            self._content = file_stream
        else:
            self._content = self._renderer.get_io()
        self.attributes = RENDERER.get_all_file_types()
 def __init__(self,
              file_content=None,
              file_type=None,
              file_stream=None,
              parser_library=None,
              **keywords):
     self.__file_type = file_type
     self.__file_stream = file_stream
     self.__file_content = file_content
     self.__parser = PARSER.get_a_plugin(file_type, parser_library)
     AbstractSource.__init__(self, **keywords)
Esempio n. 13
0
 def __init__(self,
              file_content=None,
              file_type=None,
              file_stream=None,
              parser_library=None,
              **keywords):
     self.__file_type = file_type
     self.__file_stream = file_stream
     self.__file_content = file_content
     self.__parser = PARSER.get_a_plugin(file_type, parser_library)
     AbstractSource.__init__(self, **keywords)
Esempio n. 14
0
    def __init__(self,
                 file_type=None,
                 file_stream=None,
                 renderer_library=None,
                 **keywords):
        AbstractSource.__init__(self, **keywords)

        self._renderer = RENDERER.get_a_plugin(file_type, renderer_library)
        if file_stream:
            self._content = file_stream
        else:
            self._content = self._renderer.get_io()
        self.attributes = RENDERER.get_all_file_types()
Esempio n. 15
0
 def __init__(self,
              db_type,
              export_columns=None,
              sheet_name=None,
              parser_library=None,
              renderer_library=None,
              **keywords):
     self._db_type = db_type
     self.__export_columns = export_columns
     self.__sheet_name = sheet_name
     self.__parser_library = parser_library
     self.__renderer_library = renderer_library
     AbstractSource.__init__(self, **keywords)
Esempio n. 16
0
    def __init__(self, file_name=None, parser_library=None, **keywords):
        self.__file_name = file_name

        file_type = self.__file_name.split('.')[-1]
        self.__parser = PARSER.get_a_plugin(file_type, parser_library)
        AbstractSource.__init__(self, **keywords)
Esempio n. 17
0
 def __init__(self, url=None, **keywords):
     self.__url = url
     AbstractSource.__init__(self, **keywords)
Esempio n. 18
0
 def __init__(self, bookdict, **keywords):
     self.__bookdict = bookdict
     self._content = _FakeIO()
     AbstractSource.__init__(self, **keywords)
Esempio n. 19
0
 def __init__(self, records, sheet_name=DEFAULT_SHEET_NAME, **keywords):
     self.__records = records
     self._content = _FakeIO()
     self.__sheet_name = sheet_name
     AbstractSource.__init__(self, **keywords)
Esempio n. 20
0
 def __init__(self, bookdict, **keywords):
     self.__bookdict = bookdict
     self._content = _FakeIO()
     AbstractSource.__init__(self, **keywords)
Esempio n. 21
0
 def __init__(self, url=None, **keywords):
     self.__url = url
     AbstractSource.__init__(self, **keywords)
Esempio n. 22
0
 def __init__(self, array, sheet_name=DEFAULT_SHEET_NAME,
              **keywords):
     self.__array = array
     self._content = _FakeIO()
     self.__sheet_name = sheet_name
     AbstractSource.__init__(self, **keywords)
Esempio n. 23
0
 def __init__(self, db_type, **keywords):
     self.__db_type = db_type
     AbstractSource.__init__(self, **keywords)
Esempio n. 24
0
 def __init__(self, array, sheet_name=DEFAULT_SHEET_NAME,
              **keywords):
     self.__array = array
     self._content = _FakeIO()
     self.__sheet_name = sheet_name
     AbstractSource.__init__(self, **keywords)
Esempio n. 25
0
 def __init__(self, db_type, export_columns=None,
              sheet_name=None, **keywords):
     self._db_type = db_type
     self.__export_columns = export_columns
     self.__sheet_name = sheet_name
     AbstractSource.__init__(self, **keywords)
 def __init__(self, sheet_stream, **keywords):
     self.__sheet_stream = sheet_stream
     AbstractSource.__init__(self, **keywords)