flow.record.adapter.line
¶
Module Contents¶
Classes¶
Prints all fields and values of the Record on a separate line. |
Functions¶
Return dictionary of fieldname -> fieldtype for given RecordDescriptor. |
Attributes¶
- flow.record.adapter.line.__usage__ = Multiline-String¶
Show Value
""" Line output format adapter (writer only) --- Write usage: rdump -w line://[PATH]?verbose=[VERBOSE] [PATH]: path to file. Leave empty or "-" to output to stdout Optional arguments: [VERBOSE]: Also show fieldtype in line output (default: False) """
- flow.record.adapter.line.field_types_for_record_descriptor(desc: flow.record.RecordDescriptor) dict[str, str] ¶
Return dictionary of fieldname -> fieldtype for given RecordDescriptor.
- Parameters:
desc – RecordDescriptor to get fieldtypes for
- Returns:
Dictionary of fieldname -> fieldtype
- class flow.record.adapter.line.LineWriter(path: str, *, fields: list[str] | str | None = None, exclude: list[str] | str | None = None, verbose: bool = False, **kwargs)¶
Bases:
flow.record.adapter.AbstractWriter
Prints all fields and values of the Record on a separate line.
- fp = None¶
- count = 0¶
- fields¶
- exclude¶
- verbose¶
- write(rec: flow.record.Record) None ¶
Write a record.
- flush() None ¶
Flush any buffered writes.
- close() None ¶
Close the Writer, no more writes will be possible.