bootstack.data.read_records#

bootstack.data.read_records(path, config=None)#

Stream records from a file, choosing the reader by format or extension.

Honors config.file_format when set to something other than 'auto', otherwise resolves the reader from the path’s extension.

Parameters:
  • path (str | Path) – Path to the data file.

  • config (Optional[FileSourceConfig]) – Parsing configuration (a default FileSourceConfig is used if omitted).

Returns:

A lazy iterator of record dicts.

Return type:

Iterator[Record]