def get_config(filename=None, init=None):
    if init is not None:
        return _convert_dict(init)
    if filename is None:
        return AutoAttrDict()
    if os.path.exists(filename):
        return read_config(filename)
    else:
        d = AutoAttrDict()
        write_config(d, filename)
        return d
Get an existing or new json config object.
dataset/ETHPy150Open kdart/pycopia/core/pycopia/jsonconfig.py/get_config