flow.record.adapter.csvfile
¶
Module Contents¶
Classes¶
Attributes¶
- flow.record.adapter.csvfile.__usage__ = Multiline-String¶
Show Value
""" Comma-separated values (CSV) adapter --- Write usage: rdump -w csvfile://[PATH]?lineterminator=[TERMINATOR] Read usage: rdump csvfile://[PATH]?fields=[FIELDS] [PATH]: path to file. Leave empty or "-" to output to stdout Optional parameters: [TERMINATOR]: line terminator, default is \r\n [FIELDS]: comma-separated list of CSV fields (in case of missing CSV header) """
- class flow.record.adapter.csvfile.CsvfileWriter(path: str | pathlib.Path | None, fields: str | list[str] | None = None, exclude: str | list[str] | None = None, lineterminator: str = '\r\n', **kwargs)¶
Bases:
flow.record.adapter.AbstractWriter
- fp = None¶
- lineterminator = Multiline-String¶
Show Value
""" """
- desc = None¶
- writer = None¶
- fields = None¶
- exclude = None¶
- write(r: flow.record.base.Record) None ¶
Write a record.
- flush() None ¶
Flush any buffered writes.
- close() None ¶
Close the Writer, no more writes will be possible.
- class flow.record.adapter.csvfile.CsvfileReader(path: str | pathlib.Path | None, selector: str | None = None, fields: str | list[str] | None = None, **kwargs)¶
Bases:
flow.record.adapter.AbstractReader
- fp = None¶
- selector = None¶
- dialect = 'excel'¶
- reader¶
- fields¶
- desc¶
- close() None ¶
Close the Reader, can be overriden to properly free resources.
- __iter__() collections.abc.Iterator[flow.record.base.Record] ¶
Return a record iterator.