FileIOFactory#

class scqubits.io_utils.fileio.FileIOFactory[source]#

Factory method for choosing reader/writer according to given format

Methods

FileIOFactory.__init__()

FileIOFactory.get_reader(file_name[, ...])

Based on the extension of the provided file name, return the appropriate reader engine.

FileIOFactory.get_writer(file_name[, ...])

Based on the extension of the provided file name, return the appropriate writer engine.

static get_reader(file_name, file_handle=None, get_external_reader=None)[source]#

Based on the extension of the provided file name, return the appropriate reader engine.

Return type:

Union[CSVReader, H5Reader]

Parameters:
  • file_name (str) –

  • file_handle (Group | None) –

  • get_external_reader (Callable | None) –

get_writer(file_name, file_handle=None)[source]#

Based on the extension of the provided file name, return the appropriate writer engine.

Return type:

IOWriter

Parameters:
  • file_name (str) –

  • file_handle (Group | None) –