:py:mod:`flow.record.adapter.text` ================================== .. py:module:: flow.record.adapter.text Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: flow.record.adapter.text.DefaultMissing flow.record.adapter.text.TextWriter Attributes ~~~~~~~~~~ .. autoapisummary:: flow.record.adapter.text.__usage__ flow.record.adapter.text.REPLACE_LIST .. py:data:: __usage__ :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ Textual output adapter, similar to `repr()` (writer only) --- Write usage: rdump -w text://[PATH] [PATH]: path to file. Leave empty or "-" to output to stdout """ .. raw:: html
.. py:data:: REPLACE_LIST :value: [('\\r', '\r'), ('\\n', '\n'), ('\\t', '\t')] .. py:class:: DefaultMissing Bases: :py:obj:`dict` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:method:: __missing__(key) .. py:class:: TextWriter(path, flush=True, format_spec=None, **kwargs) Bases: :py:obj:`flow.record.adapter.AbstractWriter` Records are printed as textual representation with repr() or using `format_spec`. .. py:attribute:: fp .. py:method:: write(rec) Write a record. .. py:method:: flush() Flush any buffered writes. .. py:method:: close() Close the Writer, no more writes will be possible.