epicsarchiver_mgmt.input_parsing ================================ .. py:module:: epicsarchiver_mgmt.input_parsing .. autoapi-nested-parse:: Parse the input csv file. Attributes ---------- .. autoapisummary:: epicsarchiver_mgmt.input_parsing.LOG Exceptions ---------- .. autoapisummary:: epicsarchiver_mgmt.input_parsing.ParseCSVRowError Functions --------- .. autoapisummary:: epicsarchiver_mgmt.input_parsing.parse_csv epicsarchiver_mgmt.input_parsing.single_column_csv epicsarchiver_mgmt.input_parsing.double_column_csv Module Contents --------------- .. py:data:: LOG :type: logging.Logger .. py:exception:: ParseCSVRowError(row: list[str] | None = None) Bases: :py:obj:`epicsarchiver_mgmt.exceptions.BaseMgmtError` Exception for when the csv file is invalid. .. py:attribute:: row :value: None .. py:function:: parse_csv(file: TextIO, expected_columns: int) -> dict[str, list[str]] Parse the csv file. :param file: The file to parse. :type file: TextIOWrapper :param expected_columns: The expected number of columns in csv file :type expected_columns: int :returns: The list of tuples of PVs. :rtype: list[tuple[str, ...]] :raises ParseCSVRowError: If the file is invalid. .. py:function:: single_column_csv(file: TextIO) -> collections.abc.Sequence[str] Parse the csv file with a single column. :param file: The file to parse. :type file: TextIOWrapper :returns: The list of PVs. :rtype: list[str] .. py:function:: double_column_csv(file: TextIO) -> collections.abc.Sequence[tuple[str, str]] Parse the csv file with two columns. :param file: The file to parse. :type file: TextIOWrapper :returns: The dictionary of PVs. :rtype: dict[str, str]