AvroFileWriter#

class AvroFileWriter(file: IO[bytes])[source]#

Bases: FileWriter[bytes]

Write snappy-compressed Avro records in the Nominal Core ingest schema.

Wrap the stream and write the Avro header.

Raises:

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

Attributes

Methods

write

Append data as Avro records and flush them to the stream.

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

Append data as Avro records and flush them to the stream.

newline: str | None = None#