FilePublisher#
- class FilePublisher(
- directory: str | Path,
- format: Literal['json', 'jsonl', 'csv', 'avro'] = 'avro',
- custom_file_name: str | None = None,
Bases:
objectWrite 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 the publisher and ensure all data is written.
Publish data to file using the appropriate writer.
- publish(
- data: Measurement | Command,
- **kwargs,
Publish data to file using the appropriate writer.