Skip to content

Instantly share code, notes, and snippets.

@Philistino
Philistino / configparser_to_dataclasses.py
Last active August 15, 2021 09:48 — forked from tux-00/configparser_to_dataclasses.py
Converts python config parser to dataclasses (easier access)
import configparser
from dataclasses import dataclass
@dataclass
class Sections:
raw_sections: dict
def __post_init__(self):
for section_key, section_value in self.raw_sections.items():