agglovar.io =========== .. py:module:: agglovar.io .. autoapi-nested-parse:: I/O utilities. Classes ------- .. autoapisummary:: agglovar.io.PlainOrGzReader Module Contents --------------- .. py:class:: PlainOrGzReader Read a plain or a gzipped file using context guard. :param file_path: File path or file name. :param mode: File open mode. :param is_gz: If `None`, determine if file is gzipped based on the file name. Set to `True` to force reading gzipped, `False` to force reading plain. Example:: with PlainOrGzReader('path/to/file.gz'): ... .. py:method:: __enter__() Enter context. .. py:method:: __exit__(exc_type, exc_value, traceback) Exit context. .. py:method:: __post_init__() Post initialization. .. py:attribute:: file_path :type: str | pathlib.Path .. py:attribute:: is_gz :type: Optional[bool] :value: None .. py:attribute:: mode :type: str :value: 'rt'