JsonlFileWriter#

class JsonlFileWriter(file: IO[str])[source]#

Bases: FileWriter[str]

Write newline-delimited JSON, one record per line.

Wrap the stream.

Raises:

ValueError – If the stream is not writable or is not a text stream.

Attributes

Methods

write

Append data as one JSON line, mapping non-finite floats to null.

mode: str = 'a'#
write(
data: Measurement | Command,
) → None[source]#

Append data as one JSON line, mapping non-finite floats to null.

newline: str | None = None#