codegen / utils /config /__init__.py
AP\VivekIsh
codegen: Stage the code
6fadbbc
raw
history blame
359 Bytes
import os
from pathlib import Path
from configparser import ConfigParser
this_dir = Path(__file__).parent
conf_dir = this_dir / 'properties.ini'
parser = ConfigParser(os.environ)
parser.read(conf_dir, encoding="utf8")
class Config():
@staticmethod
def read(section, property, default=None):
return parser.get(section, property) or default