EndfParserBase

class endf_parserpy.EndfParserBase[source]

Bases: ABC

Abstract base class for ENDF parsers.

This abstract base class defines the basic interface that must be provided by ENDF parser classes, such as EndfParserPy and EndfParserCpp. Therefore, any ENDF parser class should be derived from this abstract base class.

A parser is picklable: it is pickled by recipe – the arguments it was constructed with – and rebuilt by re-running __init__ on unpickling. A subclass must decorate its __init__ with _record_init_kwargs() for this to work.

abstract parse(lines: str | List[str], exclude: Tuple[int | Tuple[int, int]] | None = None, include: Tuple[int | Tuple[int, int]] | None = None) Dict[int, Dict[int, Dict[str, dict | list | int | float | str] | List[str]]][source]
abstract parsefile(filename: str, exclude: Tuple[int | Tuple[int, int]] | None = None, include: Tuple[int | Tuple[int, int]] | None = None) Dict[int, Dict[int, Dict[str, dict | list | int | float | str] | List[str]]][source]
abstract write(endf_dict: Dict[int, Dict[int, Dict[str, dict | list | int | float | str] | List[str]]], exclude: Tuple[int | Tuple[int, int]] | None = None, include: Tuple[int | Tuple[int, int]] | None = None) List[str][source]
abstract writefile(filename: str, endf_dict: Dict[int, Dict[int, Dict[str, dict | list | int | float | str] | List[str]]], exclude: Tuple[int | Tuple[int, int]] | None = None, include: Tuple[int | Tuple[int, int]] | None = None, overwrite: bool = False) None[source]