FilePublisher#

class FilePublisher(
directory: str | Path,
format: Literal['json', 'jsonl', 'csv', 'avro'] = 'avro',
custom_file_name: str | None = None,
)[source]#

Bases: object

Write Measurement/Command data to a file.

Parameters:
  • directory – Output directory.

  • format – "jsonl", "csv", "avro" (default), or "json" (deprecated).

  • custom_file_name – Filename without extension; defaults to measurements-<UTC-timestamp>.

Methods

close

Close the publisher and ensure all data is written.

open

publish

Publish data to file using the appropriate writer.