reader_factory

Factory class for generating readers

class MDMC.readers.reader_factory.ReaderFactory[source]

Provides a abstract base class for methods and properties common to all reader factories

abstract static base_class()[source]

This should be implemented to return the base class of objects returned by the ReaderFactory

classmethod create_reader(module_name: str, file_name: str) Reader[source]

Creates a reader object from a module name

The reader object must be the first class in the module. The base class which the reader must inherit is defined by cls.base_class

Parameters:
  • module_name (str) – The name of the module where the reader is the first class

  • file_name (str) – The name of the file that the Reader will read

Returns:

A Reader object

Return type:

Reader