bootstack.data.write_records#

bootstack.data.write_records(path, records, config=None, *, format=None)#

Write records to a file, choosing the writer by format or extension.

Parameters:
  • path (str | Path) – Destination file path.

  • records (Iterable[Record]) – An iterable of record dicts (consumed lazily).

  • config (Optional[FileSourceConfig]) – Optional formatting configuration (encoding, delimiter, …).

  • format (Optional[str]) – Explicit format name overriding the path extension.