pyrio.streams.file_stream
Attributes
Classes
Derived Stream class for querying files; maps file content to im-memory dict structures and vice versa |
Module Contents
- pyrio.streams.file_stream.TEMP_PATH = '{file_path}.tmp'
- pyrio.streams.file_stream.DSV_CONFIG
- pyrio.streams.file_stream.MAPPING_READ_CONFIG
- pyrio.streams.file_stream.MAPPING_WRITE_CONFIG
- class pyrio.streams.file_stream.FileStream(file_path)
Bases:
pyrio.streams.BaseStreamDerived Stream class for querying files; maps file content to im-memory dict structures and vice versa
- classmethod process(file_path, *, f_open_options=None, f_read_options=None, **kwargs)
Creates Stream from a file with advanced ‘reading’ options passed by the user
- classmethod _read_file(file_path, f_open_options=None, f_read_options=None, **kwargs)
- static _read_dsv(path, f_open_options, f_read_options)
- static _read_mapping(path, f_open_options, f_read_options, **kwargs)
- static _read_plain(path, f_open_options)
- save(file_path=None, *, f_open_options=None, f_write_options=None, null_handler=None, **kwargs)
Writes Stream to a new file (or updates an existing one) with advanced ‘writing’ options passed by the user
- _write_dsv(path, tmp_path, f_open_options, f_write_options, null_handler=None)
- _write_mapping(path, tmp_path, f_open_options, f_write_options, null_handler=None, **kwargs)
- _write_plain(path, tmp_path, f_open_options, f_write_options)
- static _get_file_path(file_path, read_mode=True)
- _prepare_file_paths(file_path)
- static _prepare_io_options(settings)
- _atomic_write(path, tmp_path, f_open_options)