flow.record.adapter.jsonfile
¶
Module Contents¶
Classes¶
Attributes¶
- flow.record.adapter.jsonfile.__usage__ = Multiline-String¶
Show Value
""" JSON adapter --- Write usage: rdump -w jsonfile://[PATH]?indent=[INDENT]&descriptors=[DESCRIPTORS] Read usage: rdump jsonfile://[PATH] [PATH]: path to file. Leave empty or "-" to output to stdout [INDENT]: optional number of identation. Omit "indent" field value for jsonlines output [DESCRIPTORS]: optional boolean. If false, don't output record descriptors (default: true) """
- class flow.record.adapter.jsonfile.JsonfileWriter(path: str | pathlib.Path | BinaryIO, indent: str | int | None = None, descriptors: bool = True, **kwargs)¶
Bases:
flow.record.adapter.AbstractWriter
- fp = None¶
- descriptors = False¶
- packer¶
- packer_on_new_descriptor(descriptor: flow.record.base.RecordDescriptor) 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.jsonfile.JsonfileReader(path: str | pathlib.Path | BinaryIO, selector: str | None = None, **kwargs)¶
Bases:
flow.record.adapter.AbstractReader
- fp = None¶
- selector = None¶
- packer¶
- close() None ¶
Close the Reader, can be overriden to properly free resources.
- __iter__() collections.abc.Iterator[flow.record.base.Record] ¶
Return a record iterator.