:py:mod:`flow.record.adapter.line` ================================== .. py:module:: flow.record.adapter.line Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: flow.record.adapter.line.LineWriter Functions ~~~~~~~~~ .. autoapisummary:: :nosignatures: flow.record.adapter.line.field_types_for_record_descriptor Attributes ~~~~~~~~~~ .. autoapisummary:: flow.record.adapter.line.__usage__ .. py:data:: __usage__ :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ 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) """ .. raw:: html
.. py:function:: field_types_for_record_descriptor(desc: flow.record.RecordDescriptor) -> dict[str, str] Return dictionary of fieldname -> fieldtype for given RecordDescriptor. :param desc: RecordDescriptor to get fieldtypes for :returns: Dictionary of fieldname -> fieldtype .. py:class:: LineWriter(path: str, *, fields: list[str] | str | None = None, exclude: list[str] | str | None = None, verbose: bool = False, **kwargs) Bases: :py:obj:`flow.record.adapter.AbstractWriter` Prints all fields and values of the Record on a separate line. .. py:attribute:: fp .. py:method:: write(rec: flow.record.Record) -> None Write a record. .. py:method:: flush() -> None Flush any buffered writes. .. py:method:: close() -> None Close the Writer, no more writes will be possible.