Atlas-Install/source/Option/load_from_json.py

3 lines
No EOL
170 B
Python

def load_from_json(self, option_json: dict):
for key, value in option_json.items(): # load all value in the json as class attribute
setattr(self, key, value)