Skip to content

importers

oxytcmri.interface.importers

Classes:

Name Description
Importer

Abstract base class for importers to repositories.

Importer

Bases: ABC

Abstract base class for importers to repositories.

This class serves as a base for all importers, providing a common interface and shared functionality.

Methods:

Name Description
import_data

Import data from the source.

register_repository

Register needed repositories for the importer, from a list of repositories.

import_data() abstractmethod

Import data from the source.

This method should be implemented by subclasses to perform the actual data import.

Source code in oxytcmri/interface/importers.py
14
15
16
17
18
19
20
21
@abstractmethod
def import_data(self):
    """
    Import data from the source.

    This method should be implemented by subclasses to perform the actual
    data import.
    """

register_repository(repositories) abstractmethod

Register needed repositories for the importer, from a list of repositories.

Parameters:

Name Type Description Default
repositories list[Repository]

The list of repositories from which the importer can choose the needed ones.

required
Source code in oxytcmri/interface/importers.py
23
24
25
26
27
28
29
30
31
32
@abstractmethod
def register_repository(self, repositories: list[Repository]):
    """
    Register needed repositories for the importer, from  a list of repositories.

    Parameters
    ----------
    repositories: list[Repository]
        The list of repositories from which the importer can choose the needed ones.
    """