pip install prototxt_parser
from prototxt_parser.prototxt_parser_main import parse def read_prototxt(file)->dict: with open(file, 'r') as f: return parse(f.read())